Practical implementation of the BitVM2 protocol
The project contains multiple crates:
Crate | Description |
---|---|
bitcoin-splitter | A crate for splitting the Bitcoin script into multiple parts as suggested by the recent 1). |
bitcoin-winternitz | Winternitz Signature and recovery implementation based on BitVM's [signatures] package. |
bitcoin-utils | Helper package containing implementation of certain fundamental operations and debugging functions. |
bitcoin-testscripts | A collection of test scripts for testing BitVM2 concept. |
bitcoin-scriptexec | A helper crate for executing Bitcoin scripts. Fork of BitVM package. |
docker compose up -d
Warning
Sometimes Docker Compose may fail at step of creating the volumes, the most simple solution is, in regards of failure, just trying starting it again several times until it works.
Let us create a temporary alias for bitcoin-cli
from the container like this:
alias bitcoin-cli="docker compose exec bitcoind bitcoin-cli"
Create a fresh wallet for your user:
bitcoin-cli createwallet "my"
Warning
Do not create more than one wallet, otherwise further steps would require a bit of modification.
Generate fresh address and store it to environmental variable:
export ADDRESS=$(bitcoin-cli getnewaddress "main" "bech32")
Then mine 101 blocks to your address:
bitcoin-cli generatetoaddress 101 $ADDRESS
Note
Rewards for mined locally blocks will go to this address, but, by protocol rules, BTCs are mature only after 100 confirmations, so that's why 101 blocks are mined. You can see other in immature
balances fields, after executing next command.
For more info about Bitcoin RPC API see 2.
bitcoin-cli getbalances