Module bdk::blockchain::rpc
source · Available on crate feature
rpc
only.Expand description
Rpc Blockchain
Backend that gets blockchain data from Bitcoin Core RPC
This is an EXPERIMENTAL feature, API and other major changes are expected.
Example
let config = RpcConfig {
url: "127.0.0.1:18332".to_string(),
auth: Auth::Cookie {
file: "/home/user/.bitcoin/.cookie".into(),
},
network: bdk::bitcoin::Network::Testnet,
wallet_name: "wallet_name".to_string(),
sync_params: None,
};
let blockchain = RpcBlockchain::from_config(&config);
Structs
- The main struct for RPC backend implementing the crate::blockchain::Blockchain trait
- Factory of
RpcBlockchain
instances, implementsBlockchainFactory
- RpcBlockchain configuration options
- Sync parameters for Bitcoin Core RPC.
Enums
- This struct is equivalent to bitcoincore_rpc::Auth but it implements serde::Serialize To be removed once upstream equivalent is implementing Serialize (json serialization format should be the same), see rust-bitcoincore-rpc/pull/181