Skip to content

Commit

Permalink
Merge pull request #35 from bitfinity-network/develop
Browse files Browse the repository at this point in the history
Updated README
  • Loading branch information
alexshelkov authored Jul 18, 2024
2 parents aac7c56 + 7306cf3 commit 083c30f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 5 deletions.
45 changes: 41 additions & 4 deletions apps/widget-demo/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# The React Bitfinity Bridge Widget Application demo

### Install deps:

```
"@bitfinity-network/bridge": "^1.1.0",
"@bitfinity-network/bridge-widget": "^1.1.0",
"@rainbow-me/rainbowkit": "^2.0.7",
"@particle-network/btc-connectkit": "^1.0.0-alpha.25"
```

### Setup packer

Here is an example for Vite:

```typescript
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { nodePolyfills } from 'vite-plugin-node-polyfills';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
nodePolyfills({
include: ['buffer'],
globals: {
Buffer: true
}
})
],
define: {
'process.env': process.env,
global: 'window'
}
});
```

### Setup widget

You could clone this repository to bootstrap the integration.

Or to get started use the following config to init the widget:
Expand Down Expand Up @@ -28,10 +66,9 @@ const config = getDefaultConfig({
chains: [...BITFINITY_CHAINS]
});

//
// Sample mainnet bridge configuration
// Use at your own caution. Bridges have not been audited, and Bitfinity makes no warrantee about the security.
// This is hooks up to an example bridge that is not deployed by Bitfinity.
// sample mainnet bridge configuration
// use at your own caution. Bridges have not been audited, and Bitfinity makes no warrantee about the security.
// this is hooks up to an example bridge that is not deployed by Bitfinity.
const networks = [
{
name: 'mainnet',
Expand Down
3 changes: 2 additions & 1 deletion apps/widget-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"typescript": "^5.2.2",
"vite": "^5.2.0"
"vite": "^5.2.0",
"vite-plugin-node-polyfills": "^0.22.0"
}
}

0 comments on commit 083c30f

Please sign in to comment.