cd sbtc-bridge-web
npm i // node -v 18.xx
npm run sim
# starts on port 8080
cd sbtc-bridge-api/sbtc-signer-web
npm i // node -v 18.xx
npm run sim
# starts on port 8081
Run bridge and signer dashboard api apps;
cd sbtc-bridge-api/sbtc-bridge-api
npm i // node -v 19.xx
npm run sim
# starts on port 3010
cd sbtc-bridge-api/sbtc-signer-api
npm i // node -v 19.xx
npm run sim
# starts on port 4010
Step 2: Bootstrap the sBTC Mini Contracts
Add the localhost:3999 network to Hiro wallet
Connect the signer dashboard (localhost:8081) to the deployer account (sbtc-mini/settings/Devnet.toml)
Click the upgrade button and check the transaction confirms;
The Signer Dashboard has a button for this;
Step 3: Create and fund a regtest descriptor wallet
See Appendix A for examples and config files. Summary of the steps;
Run bitcoin on regtest on a different network to clarinets bitcoind.
Connect this node to clarinets network
Create a descriptor wallet
Generate the descriptor keys
Generate receiving addresses
For funding the addresses see Appendix B. Check Clarinet sees the newly mined blocks.
Appendix A: Run Bitcoin regtest and create descriptor wallet
We need a regtest bitcoin core wallet that connects to the bitcoind running via clarinet integrate. The following config file acheive this;
your_mnemonic: now jewel fault pottery tag pond uphold night undo owner split stone
getdescriptorinfo "tr(tprv8ZgxMBicQKsPecRC2CKvGZtyJpUENvhhvgWHkoVSc4ye16qadK41vFggnqY7CVLSNZCYV1PhAZwSA8EeB3zaZhqwQUnaFoy84SuzY7XyXwR/86'/1'/0'/0/*)"
importdescriptors "[{\"desc\":\"tr(tprv8ZgxMBicQKsPecRC2CKvGZtyJpUENvhhvgWHkoVSc4ye16qadK41vFggnqY7CVLSNZCYV1PhAZwSA8EeB3zaZhqwQUnaFoy84SuzY7XyXwR/86'/1'/0'/0/*)#u99f0ylg\",\"active\":true,\"timestamp\":\"now\",\"range\":[0,1000],\"next_index\":1}]"
Note - may need to enter wallet passphrase.. if so
curl --user "devnet:devnet" --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "walletpassphrase", "params": ["devnet", 600]}' -H "Content-Type: application/json" http://127.0.0.1:18446/wallet/SBTC-0001