echo create temp diretory to store bitcoind data
mkdir -p /tmp/regtest1/bitcoind
echo start bitcoind in regtest mode
bitcoind -datadir=/tmp/regtest1/bitcoind -regtest -server -fallbackfee=0.0002 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 -peerblockfilters=1 -daemon
echo create blank descriptor wallet
bitcoin-cli -datadir=/tmp/regtest1/bitcoind -regtest -named createwallet wallet_name="regtest1" blank=true disable_private_keys=true
{
Some notes on my manual rpc cli setup and testing:
- start bitcoind in regtest mode
mkdir /tmp/bitcoind
bitcoind -datadir=/tmp/bitcoind -regtest -server -fallbackfee=0.0002 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 --peerblockfilters=1 -daemon
- create bitcoind test wallet and generate blocks
bitcoin-cli -datadir=/tmp/bitcoind -regtest createwallet "test"
Create a signing service that when properly authorized will add valid signatures to a client's PSBT without knowing the client's full wallet history. The signing service must be able to determine the transaction spending amount. The client must be able to sign and finalize a transactions independently of the service.
- For each client the signing service creates a signing bip39 xprv key and shares the corresponding xpub with the client's software. The signing service does not need to share any root key information with the client except the key fingerprint. Example:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install bitcoind via your favorite method | |
# start regtest bitcoind | |
mkdir -p /tmp/regtest1/bitcoind | |
bitcoind -datadir=/tmp/regtest1/bitcoind -regtest -server -fallbackfee=0.0002 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 -peerblockfilters=1 -daemon | |
# cookie file location: /tmp/regtest1/bitcoind/regtest/.cookie | |
# create test bitcoind wallet | |
bitcoin-cli -datadir=/tmp/regtest1/bitcoind -regtest -named createwallet wallet_name="regtest1" disable_private_keys=true blank=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install bitcoind via your favorite method | |
# start signet bitcoind | |
mkdir -p /tmp/signet1/bitcoind | |
bitcoind -datadir=/tmp/signet1/bitcoind -signet -server -fallbackfee=0.0002 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 -peerblockfilters=1 -daemon | |
# cookie file location: /tmp/signet1/bitcoind/signet/.cookie | |
# get blockchain info | |
bitcoin-cli -datadir=/tmp/signet1/bitcoind -signet getblockchaininfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install bitcoind via your favorite method | |
# start regtest bitcoind | |
mkdir -p /tmp/regtest1/bitcoind | |
bitcoind -datadir=/tmp/regtest1/bitcoind -regtest -server -fallbackfee=0.0002 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 -peerblockfilters=1 -daemon | |
# cookie file location: /tmp/regtest1/bitcoind/regtest/.cookie | |
# create test bitcoind wallet | |
bitcoin-cli -datadir=/tmp/regtest1/bitcoind -regtest createwallet "regtest1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start regtest bitcoind | |
mkdir -p /tmp/regtest1/bitcoind | |
bitcoind -datadir=/tmp/regtest1/bitcoind -regtest -server -fallbackfee=0.0002 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 -peerblockfilters=1 -daemon | |
# generate keys and create test descriptor | |
cargo run --features rpc -- key generate | |
ALICE_KEY=tprv8ZgxMBicQKsPec2RXKZgdJhFsnm2s4xZvYXaaUzcyr3ybx9L2kCTtGAjYjAEuT1aPoLapD6M5Zrk99u4xHZf2NbdPT2X7zsu5qoWmSxoiVC | |
BOB_KEY=tprv8ZgxMBicQKsPfKtuWgVHdn5C1AJvXgSTPJqyCfAa5aCxFutmCnxS8DRT8Cyni4mk4NDes5Cpqb93RLsjy9a7ZXEw4sZDZ6Xpk3vpgYsiH22 | |
DESC="wsh(multi(2,$ALICE_KEY/*,$BOB_KEY/*))" |
This gist demonstrates how to create a bitcoind wallet that is based on pay to taproot (P2TR) descriptors.
Tools used:
- docker with image bitcoindevkit/bitcoind:v22.0rc2
- bitcoin dev kit cli, bdk-cli
About bech32 vs bech32m addresses
Steps:
- Create aliases to work with bitcoind docker image
-
Clone
rust-lightning
git repo2. -
Install
clang-12
and set it as the default versionlinux Ubuntu install and set it as the default version
macos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cargo +nightly fmt -- --config format_code_in_doc_comments=true |
NewerOlder