Skip to content

sCrypt-Inc/bsv-btc-swap

Repository files navigation

BSV-BTC Atomic Swap Using HTLC

Prepare

Install project dependencies:

npm i
pip install bitcoin-utils==0.5.9

Compile contract:

npx scrypt-cli compile

Deployment

For BTC, adjust TODOs in btc-scripts and run:

python3 btc-scripts/deploy.py

You can broadcast the generated TX using this site.

To deploy the sCrypt contract, configure your values in deploy.ts and run:

npx scrypt-cli deploy

Don't forget to fund your key beforehand. You can use our faucet.

Tests

To run local tests for the sCrypt smart contract, run:

npm t

To run a test (deployment and contract calls) on the BSV testnet, run:

npm run testnet

About

Demo code for an atomic swap between BSV and BTC using HTLC.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published