Closed notmandatory closed 1 year ago
Local regtest electrs doesn't use SSL, so I had to change the regtest url to use tcp instead of ssl.
regtest
I confirmed this works using these steps:
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"
generate bitcoin blocks
bitcoin-cli -datadir=/tmp/regtest1/bitcoind -regtest getnewaddress bitcoin-cli -datadir=/tmp/regtest1/bitcoind -regtest generatetoaddress 101 "<newaddress>"
5 install electrs (for mac m1)
brew install rocksdb cargo install electrs --git https://github.com/romanz/electrs.git --branch bump-msrv
mkdir -p /tmp/regtest1/electrs electrs --db-dir /tmp/regtest1/electrs --daemon-dir /tmp/regtest1/bitcoind --cookie-file /tmp/regtest1/bitcoind/regtest/.cookie --network regtest
export DESCRIPTOR="tr(tprv8ZgxMBicQKsPd8kkvjJukqwX6TsEAEscD42chy8edbgFrdRUj72deq7PG4tsqnm3a7SjjBmRZ4F9p9ZSBsb5jKXhirHz2MxQcF2vVq1Xocr/0/*)"
cargo run -- --network regtest address new
8. send coins to bdk_core wallet
bitcoin-cli -datadir=/tmp/regtest1/bitcoind -regtest generatetoaddress 10 ""
9. scan wallet addresses (from bdk_electrum_example directory)
cargo run -- --network regtest scan
10. check balance (from bdk_electrum_example directory)
cargo run -- --network regtest balance
Local regtest electrs doesn't use SSL, so I had to change the
regtest
url to use tcp instead of ssl.I confirmed this works using these steps:
install bitcoind via your favorite method
start regtest bitcoind
cookie file location: /tmp/regtest1/bitcoind/regtest/.cookie
create test bitcoind wallet
generate bitcoin blocks
5 install electrs (for mac m1)
cargo run -- --network regtest address new
bitcoin-cli -datadir=/tmp/regtest1/bitcoind -regtest generatetoaddress 10 ""
cargo run -- --network regtest scan
cargo run -- --network regtest balance