The repository stops at the interface an external wallet consumes. This page names that surface, its owners, and the proof that a process outside the node crates can use it. Wallet keys, coin selection, and signing stay out of tree.
- An external wallet talks to a running node through native Esplora HTTP
and/or the wallet-free JSON-RPC methods declared in
MANIFEST(crates/rpc/src/manifest.rs). The embeddableNodeAPI (crates/node/src/embed.rs) is the in-process equivalent of the same facts, not a second surface. - The consumer does not import
NodeState,UtxoSet, index types, or other crate-internal handles. Descriptor helpers,scantxoutset,combinepsbt,finalizepsbt, andsendrawtransactionremain node RPCs because they do not require key custody. - Owner: Esplora router
crates/rpc/src/esplora.rs; JSON-RPC dispatchcrates/rpc/src/handlers.rs; embeddingcrates/node/src/embed.rs.
Esplora lives at /api on the JSON-RPC listener. That directory is the
electrs/mempool.space base URL. Relative routes below are appended to it.
- Chain tip:
GET /blocks/tip/height,GET /blocks/tip/hash. - Checkpoint hashes:
GET /block-height/{h}(BDK walks this while building its chain). - Headers:
GET /block/{hash}/header(80-byte header as hex). - Fee estimates:
GET /fee-estimates. - Address or script activity:
GET /address/{addr},/utxo,/txsand thescripthashtwins. BDK syncs through scripthash, not address. These routes follow--scriptindex; they return HTTP 503 until that index covers the applied tip. - Broadcast:
POST /tx(hex body), which dispatchessendrawtransactionthrough the same admission owner as JSON-RPC. /apiis a closed electrs namespace: a request in it never falls through to JSON-RPC. Unprefixed electrs paths on this listener 404 so JSON-RPC keeps/./api/v1is Mempool's API on the explorer port, not an Esplora alias here./apidoes not serve mempool-backend helpers./internal/*and/block-templatelive under/esplora, the electrs supersetmempool/backenduses asESPLORA_REST_API_URL.
- In-tree fixtures that violate
WF-01do not prove this contract. - Proof:
bin/bitcoin-rs/tests/wallet_facing.rslives in the binary package so it can spawnCARGO_BIN_EXE_bitcoin-rs. The package[lib]is process-input adapters (bitcoin.conf). The binary package still compiles node and storage so the daemon can start;source_does_not_import_node_internalsenforcesWF-01on uncommented proof source, including aliases and fully qualified paths. The test depends on rust-bitcoin and speaks only HTTP. It funds a regtest chain throughgetblocktemplate/submitblock(this node has nogenerate*RPC), then issues the BDK/esplora-client dialect against/api— tip, block height, headers, scripthash UTXOs/history, fee estimates, andPOST /api/tx— the same operations bitcoin-wallet (btcw -u) sends against any Esplora URL. - Named out-of-repo consumer:
btcw -n regtest -u http://<rpc-bind>/apiagainst a node started with--network regtest --scriptindex. Failures of that run are public-interface defects, not reasons to patch a wallet into this repository.
bin/bitcoin-rs/tests/wallet_facing.rs::external_wallet_can_scan_estimate_and_broadcastcrates/rpc/src/esplora.rstestsesplora_lives_only_under_the_api_prefix,api_is_the_public_electrs_directory, andesplora_is_the_mempool_backend_supersetbin/bitcoin-rs/tests/wallet_facing.rs::source_does_not_import_node_internals
Wallet-free RPC boundary, Esplora request chain view, embedded node.