This project auto-generates the client code to interact with Bitcoin Core in Rust using interprocess communication.
Building this crate requires the capnp
compiler.
macOS:
brew install capnpDebian / Ubuntu:
sudo apt-get install capnproto libcapnp-devIf /capnp/c++.capnp cannot be found during cargo build, install the
platform's Cap'n Proto development package in addition to the compiler.
To compile this crate your project must use a Rust compiler of 1.85 or higher.
cargo buildThe integration tests connect to a running bitcoin node via IPC. For a single test script, see contrib/run-tests.sh.
cd /path/to/bitcoin
cmake -B build -DENABLE_WALLET=ON -DBUILD_TESTS=OFF
cmake --build build -j$(nproc)./build/bin/bitcoin node -chain=regtest -ipcbind=unix -server -debug=ipc -daemonThe tests talk to the node only over its IPC socket, including the JSON-RPC
calls they make through the Rpc interface. If the node was started with
-datadir, set BITCOIN_DATADIR to the same path so the tests can find the
socket.
The test harness bootstraps regtest chain state and ensures the test wallet is available before running integration tests.
cargo test./build/bin/bitcoin rpc -chain=regtest stopCreative Commons 1.0 Universal