The Bitcoin Snap allows MetaMask and dapps to support all Bitcoin-related networks and address types.
- MetaMask Flask
- Nodejs
20
. We strongly recommend you install via NVM to avoid incompatibility issues between different node projects.- Once installed, you should also install Yarn with
npm i -g yarn
to make working with this repository easiest.
- Once installed, you should also install Yarn with
nvm use 20
yarn install
please see ./src/packages/.env.example
for reference
yarn start
- Snap server and debug page: http://localhost:8080/
- Example UI dapp: http://localhost:3000/
# Running Snap via watch mode
yarn workspace @metamask/bitcoin-wallet-snap start
Alternatively you can build and serve the snap manually. This can sometimes be more stable than watch mode but requires a manual rebuild and serve anytime there is a change on the snap.
# Building and serving snap manually
yarn workspace @metamask/bitcoin-wallet-snap build
yarn workspace @metamask/bitcoin-wallet-snap serve
# Running example UI
yarn workspace example start