Simple app that allows tracking and transfers of both evm and bitcoin assets in unified manner using MetaMask bitcoin snap extension.
This project consists of 2 components: ui and api. In order to run it successfully, both have to be running at the same time. For those purposes, there are 2 dependencies: pnpm
nodejs package manager, and cargo
Rust package manager.
This demo used the BOB MetaMask Btcsnap. This requires that you use MetaMask flask. MetaMask recommend that this is installed in a separate browser profile from MetaMask.
- Obtain Unisat API key to use their service. And put the key in
api/unisat_api_key.txt
file. - Move to api directory
$ cd api/
- Compile and run the service with
cargo run
- Api server should be now running at
localhost:8000
- Api documentation can be found in
api/README.md
directory.
- Move to ui directory
$ cd ui/
- Install pnpm
- Run
pnpm install
- Go to Conduit
- Click the 'Add to wallet button.' to add Bob L2 network to your metamask wallet.
- Run
$ pnpm dev
inui
directory - UI is now running locally on port 5173
- Go to
localhost:5173
and click onConnect wallet
, your wallet will get connected and bitcoin snap extension will be installed. After this, you have to approve all the permission in Metamask to access the bitcoin addresses. - Now you have bitcoin address derived from your Metamask account, you can send testnet BTC or brc20s to see them in the app and move them around.
- App runs on bitcoin testnet, so make sure correct network is used.
- This app supports only MetaMask Flask as it uses an unverified bitcoin snap extension to manage your bitcoin accounts via MetaMask.
- Bitcoin transfers are not implemented yet.