Struct bitcoind_json_rpc_client::client_sync::v24::Client
source · pub struct Client { /* private fields */ }
Expand description
Client implements a JSON-RPC client for the Bitcoin Core daemon or compatible APIs.
Implementations§
source§impl Client
impl Client
source§impl Client
impl Client
pub fn get_blockchain_info(&self) -> Result<GetBlockchainInfo>
source§impl Client
impl Client
sourcepub fn best_block_hash(&self) -> Result<BlockHash>
pub fn best_block_hash(&self) -> Result<BlockHash>
Gets the blockhash of the current chain tip.
pub fn get_best_block_hash(&self) -> Result<GetBestBlockHash>
source§impl Client
impl Client
pub fn get_block_verbosity_zero( &self, hash: &BlockHash, ) -> Result<GetBlockVerbosityZero>
pub fn get_block_verbosity_one( &self, hash: &BlockHash, ) -> Result<GetBlockVerbosityOne>
source§impl Client
impl Client
pub fn generate_to_address( &self, nblocks: usize, address: &Address, ) -> Result<GenerateToAddress>
source§impl Client
impl Client
sourcepub fn server_version(&self) -> Result<usize>
pub fn server_version(&self) -> Result<usize>
Returns the server version field of GetNetworkInfo
.
pub fn get_network_info(&self) -> Result<GetNetworkInfo>
source§impl Client
impl Client
sourcepub fn check_expected_server_version(&self) -> Result<()>
pub fn check_expected_server_version(&self) -> Result<()>
Checks that the JSON-RPC endpoint is for a bitcoind
instance with the expected version.
source§impl Client
impl Client
pub fn send_raw_transaction( &self, tx: &Transaction, ) -> Result<SendRawTransaction>
source§impl Client
impl Client
pub fn create_wallet(&self, wallet: &str) -> Result<CreateWallet>
source§impl Client
impl Client
pub fn unload_wallet(&self, wallet: &str) -> Result<UnloadWallet>
source§impl Client
impl Client
pub fn load_wallet(&self, wallet: &str) -> Result<LoadWallet>
source§impl Client
impl Client
pub fn get_balance(&self) -> Result<GetBalance>
source§impl Client
impl Client
pub fn get_balances(&self) -> Result<GetBalances>
source§impl Client
impl Client
sourcepub fn new_address(&self) -> Result<Address>
pub fn new_address(&self) -> Result<Address>
Gets a new address from bitcoind
and parses it assuming its correct.
sourcepub fn new_address_with_type(&self, ty: AddressType) -> Result<Address>
pub fn new_address_with_type(&self, ty: AddressType) -> Result<Address>
Gets a new address from bitcoind
and parses it assuming its correct.
pub fn get_new_address(&self) -> Result<GetNewAddress>
pub fn get_new_address_with_type( &self, ty: AddressType, ) -> Result<GetNewAddress>
source§impl Client
impl Client
pub fn send_to_address( &self, address: &Address<NetworkChecked>, amount: Amount, ) -> Result<Txid>
source§impl Client
impl Client
pub fn get_transaction(&self, txid: Txid) -> Result<GetTransaction>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more