Struct 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

Source

pub fn new(url: &str, auth: Option<Auth>) -> Result<Self>

Create a new JSON-RPC client to the bitcoind node using HTTPS or HTTP.

Trait Implementations§

Source§

impl Clone for Client

Source§

fn clone(&self) -> Client

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Client

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl RpcApi for Client

Source§

fn call<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 self, method: &'life1 str, params: &'life2 [Value], ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
where T: 'async_trait + for<'de> Deserialize<'de>, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Call a cmd rpc with given args list
Source§

fn get_by_id<'life0, 'life1, 'async_trait, T>( &'life0 self, id: &'life1 <T as Queryable<Self>>::Id, ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
where <T as Queryable<Self>>::Id: Sync, T: 'async_trait + Queryable<Self>, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Query an object implementing Querable type
Source§

fn get_network_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetNetworkInfoResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn get_index_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetIndexInfoResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn version<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn add_multisig_address<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, nrequired: usize, keys: &'life1 [PubKeyOrAddress<'_>], label: Option<&'life2 str>, address_type: Option<AddressType>, ) -> Pin<Box<dyn Future<Output = Result<AddMultiSigAddressResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn load_wallet<'life0, 'life1, 'async_trait>( &'life0 self, wallet: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<LoadWalletResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn unload_wallet<'life0, 'life1, 'async_trait>( &'life0 self, wallet: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<Option<UnloadWalletResult>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn create_wallet<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, wallet: &'life1 str, disable_private_keys: Option<bool>, blank: Option<bool>, passphrase: Option<&'life2 str>, avoid_reuse: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<LoadWalletResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn list_wallets<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn list_wallet_dir<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn get_wallet_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetWalletInfoResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn backup_wallet<'life0, 'life1, 'async_trait>( &'life0 self, destination: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn dump_private_key<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 Address, ) -> Pin<Box<dyn Future<Output = Result<PrivateKey>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn encrypt_wallet<'life0, 'life1, 'async_trait>( &'life0 self, passphrase: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_difficulty<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<f64>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn get_connection_count<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn get_block<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 BlockHash, ) -> Pin<Box<dyn Future<Output = Result<Block>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_block_hex<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 BlockHash, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_block_info<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 BlockHash, ) -> Pin<Box<dyn Future<Output = Result<GetBlockResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_block_header<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 BlockHash, ) -> Pin<Box<dyn Future<Output = Result<Header>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_block_header_info<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 BlockHash, ) -> Pin<Box<dyn Future<Output = Result<GetBlockHeaderResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_mining_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetMiningInfoResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn get_block_template<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, mode: GetBlockTemplateModes, rules: &'life1 [GetBlockTemplateRules], capabilities: &'life2 [GetBlockTemplateCapabilities], ) -> Pin<Box<dyn Future<Output = Result<GetBlockTemplateResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_blockchain_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetBlockchainInfoResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns a data structure containing various state info regarding blockchain processing.
Source§

fn get_block_count<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns the numbers of block in the longest chain.
Source§

fn get_best_block_hash<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<BlockHash>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns the hash of the best (tip) block in the longest blockchain.
Source§

fn get_block_hash<'life0, 'async_trait>( &'life0 self, height: u64, ) -> Pin<Box<dyn Future<Output = Result<BlockHash>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Get block hash at a given height
Source§

fn get_block_stats<'life0, 'async_trait>( &'life0 self, height: u64, ) -> Pin<Box<dyn Future<Output = Result<GetBlockStatsResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn get_block_stats_fields<'life0, 'life1, 'async_trait>( &'life0 self, height: u64, fields: &'life1 [BlockStatsFields], ) -> Pin<Box<dyn Future<Output = Result<GetBlockStatsResultPartial>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_raw_transaction<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, txid: &'life1 Txid, block_hash: Option<&'life2 BlockHash>, ) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_raw_transaction_hex<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, txid: &'life1 Txid, block_hash: Option<&'life2 BlockHash>, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_raw_transaction_info<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, txid: &'life1 Txid, block_hash: Option<&'life2 BlockHash>, ) -> Pin<Box<dyn Future<Output = Result<GetRawTransactionResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_block_filter<'life0, 'life1, 'async_trait>( &'life0 self, block_hash: &'life1 BlockHash, ) -> Pin<Box<dyn Future<Output = Result<GetBlockFilterResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_balance<'life0, 'async_trait>( &'life0 self, minconf: Option<usize>, include_watchonly: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<Amount>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn get_balances<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetBalancesResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn get_received_by_address<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 Address, minconf: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Amount>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_transaction<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 Txid, include_watchonly: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetTransactionResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_transactions<'life0, 'life1, 'async_trait>( &'life0 self, label: Option<&'life1 str>, count: Option<usize>, skip: Option<usize>, include_watchonly: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ListTransactionResult>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_since_block<'life0, 'life1, 'async_trait>( &'life0 self, blockhash: Option<&'life1 BlockHash>, target_confirmations: Option<usize>, include_watchonly: Option<bool>, include_removed: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<ListSinceBlockResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_tx_out<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 Txid, vout: u32, include_mempool: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<Option<GetTxOutResult>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_tx_out_proof<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, txids: &'life1 [Txid], block_hash: Option<&'life2 BlockHash>, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn import_public_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, pubkey: &'life1 PublicKey, label: Option<&'life2 str>, rescan: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn import_private_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, privkey: &'life1 PrivateKey, label: Option<&'life2 str>, rescan: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn import_address<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, address: &'life1 Address, label: Option<&'life2 str>, rescan: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn import_address_script<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, script: &'life1 Script, label: Option<&'life2 str>, rescan: Option<bool>, p2sh: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn import_multi<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, requests: &'life1 [ImportMultiRequest<'_>], options: Option<&'life2 ImportMultiOptions>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ImportMultiResult>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn import_descriptors<'life0, 'async_trait>( &'life0 self, req: ImportDescriptors, ) -> Pin<Box<dyn Future<Output = Result<Vec<ImportMultiResult>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn set_label<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, address: &'life1 Address, label: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn key_pool_refill<'life0, 'async_trait>( &'life0 self, new_size: Option<usize>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn list_unspent<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, minconf: Option<usize>, maxconf: Option<usize>, addresses: Option<&'life1 [&'life2 Address<NetworkChecked>]>, include_unsafe: Option<bool>, query_options: Option<ListUnspentQueryOptions>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ListUnspentResultEntry>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn lock_unspent<'life0, 'life1, 'async_trait>( &'life0 self, outputs: &'life1 [OutPoint], ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

To unlock, use [unlock_unspent].
Source§

fn unlock_unspent<'life0, 'life1, 'async_trait>( &'life0 self, outputs: &'life1 [OutPoint], ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn unlock_unspent_all<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Unlock all unspent UTXOs.
Source§

fn list_received_by_address<'life0, 'life1, 'async_trait>( &'life0 self, address_filter: Option<&'life1 Address>, minconf: Option<u32>, include_empty: Option<bool>, include_watchonly: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ListReceivedByAddressResult>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn create_psbt<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, inputs: &'life1 [CreateRawTransactionInput], outputs: &'life2 HashMap<String, Amount>, locktime: Option<i64>, replaceable: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn create_raw_transaction_hex<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, utxos: &'life1 [CreateRawTransactionInput], outs: &'life2 HashMap<String, Amount>, locktime: Option<i64>, replaceable: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn create_raw_transaction<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, utxos: &'life1 [CreateRawTransactionInput], outs: &'life2 HashMap<String, Amount>, locktime: Option<i64>, replaceable: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn decode_raw_transaction<'life0, 'async_trait, R>( &'life0 self, tx: R, is_witness: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<DecodeRawTransactionResult>> + Send + 'async_trait>>
where R: 'async_trait + RawTx + Send, Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn fund_raw_transaction<'life0, 'life1, 'async_trait, R>( &'life0 self, tx: R, options: Option<&'life1 FundRawTransactionOptions>, is_witness: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<FundRawTransactionResult>> + Send + 'async_trait>>
where R: 'async_trait + RawTx + Send, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn sign_raw_transaction<'life0, 'life1, 'life2, 'async_trait, R>( &'life0 self, tx: R, utxos: Option<&'life1 [SignRawTransactionInput]>, private_keys: Option<&'life2 [PrivateKey]>, sighash_type: Option<SigHashType>, ) -> Pin<Box<dyn Future<Output = Result<SignRawTransactionResult>> + Send + 'async_trait>>
where R: 'async_trait + RawTx + Send, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

👎Deprecated
Source§

fn sign_raw_transaction_with_wallet<'life0, 'life1, 'async_trait, R>( &'life0 self, tx: R, utxos: Option<&'life1 [SignRawTransactionInput]>, sighash_type: Option<SigHashType>, ) -> Pin<Box<dyn Future<Output = Result<SignRawTransactionResult>> + Send + 'async_trait>>
where R: 'async_trait + RawTx + Send, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn sign_raw_transaction_with_key<'life0, 'life1, 'life2, 'async_trait, R>( &'life0 self, tx: R, privkeys: &'life1 [PrivateKey], prevtxs: Option<&'life2 [SignRawTransactionInput]>, sighash_type: Option<SigHashType>, ) -> Pin<Box<dyn Future<Output = Result<SignRawTransactionResult>> + Send + 'async_trait>>
where R: 'async_trait + RawTx + Send, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn test_mempool_accept<'life0, 'life1, 'async_trait, R>( &'life0 self, rawtxs: &'life1 [R], ) -> Pin<Box<dyn Future<Output = Result<Vec<TestMempoolAcceptResult>>> + Send + 'async_trait>>
where R: 'async_trait + RawTx + Sync, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn stop<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn verify_message<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, address: &'life1 Address, signature: &'life2 Signature, message: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn get_new_address<'life0, 'life1, 'async_trait>( &'life0 self, label: Option<&'life1 str>, address_type: Option<AddressType>, ) -> Pin<Box<dyn Future<Output = Result<Address<NetworkUnchecked>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Generate new address under own control
Source§

fn get_raw_change_address<'life0, 'async_trait>( &'life0 self, address_type: Option<AddressType>, ) -> Pin<Box<dyn Future<Output = Result<Address<NetworkUnchecked>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Generate new address for receiving change
Source§

fn get_address_info<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 Address, ) -> Pin<Box<dyn Future<Output = Result<GetAddressInfoResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn generate_to_address<'life0, 'life1, 'async_trait>( &'life0 self, block_num: u64, address: &'life1 Address<NetworkChecked>, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockHash>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mine block_num blocks and pay coinbase to address Read more
Source§

fn generate<'life0, 'async_trait>( &'life0 self, block_num: u64, maxtries: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockHash>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Mine up to block_num blocks immediately (before the RPC call returns) to an address in the wallet.
Source§

fn invalidate_block<'life0, 'life1, 'async_trait>( &'life0 self, block_hash: &'life1 BlockHash, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark a block as invalid by block_hash
Source§

fn reconsider_block<'life0, 'life1, 'async_trait>( &'life0 self, block_hash: &'life1 BlockHash, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark a block as valid by block_hash
Source§

fn get_mempool_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetMempoolInfoResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns details on the active state of the TX memory pool
Source§

fn get_raw_mempool<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Txid>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Get txids of all transactions in a memory pool
Source§

fn get_raw_mempool_verbose<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HashMap<Txid, GetMempoolEntryResult>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Get details for the transactions in a memory pool
Source§

fn get_mempool_entry<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 Txid, ) -> Pin<Box<dyn Future<Output = Result<GetMempoolEntryResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get mempool data for given transaction
Source§

fn get_chain_tips<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetChainTipsResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Get information about all known tips in the block tree, including the main chain as well as stale branches.
Source§

fn send_to_address<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, address: &'life1 Address<NetworkChecked>, amount: Amount, comment: Option<&'life2 str>, comment_to: Option<&'life3 str>, subtract_fee: Option<bool>, replaceable: Option<bool>, confirmation_target: Option<u32>, estimate_mode: Option<EstimateMode>, ) -> Pin<Box<dyn Future<Output = Result<Txid>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn add_node<'life0, 'life1, 'async_trait>( &'life0 self, addr: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Attempts to add a node to the addnode list. Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be full nodes/support SegWit as other outbound peers are (though such peers will not be synced from).
Source§

fn remove_node<'life0, 'life1, 'async_trait>( &'life0 self, addr: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Attempts to remove a node from the addnode list.
Source§

fn onetry_node<'life0, 'life1, 'async_trait>( &'life0 self, addr: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Attempts to connect to a node without permanently adding it to the addnode list.
Source§

fn disconnect_node<'life0, 'life1, 'async_trait>( &'life0 self, addr: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Immediately disconnects from the specified peer node.
Source§

fn disconnect_node_by_id<'life0, 'async_trait>( &'life0 self, node_id: u32, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn get_added_node_info<'life0, 'life1, 'async_trait>( &'life0 self, node: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<Vec<GetAddedNodeInfoResult>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here)
Source§

fn get_node_addresses<'life0, 'async_trait>( &'life0 self, count: Option<usize>, ) -> Pin<Box<dyn Future<Output = Result<Vec<GetNodeAddressesResult>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Return known addresses which can potentially be used to find new nodes in the network
Source§

fn list_banned<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<ListBannedResult>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

List all banned IPs/Subnets.
Source§

fn clear_banned<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Clear all banned IPs.
Source§

fn add_ban<'life0, 'life1, 'async_trait>( &'life0 self, subnet: &'life1 str, bantime: u64, absolute: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Attempts to add an IP/Subnet to the banned list.
Source§

fn remove_ban<'life0, 'life1, 'async_trait>( &'life0 self, subnet: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Attempts to remove an IP/Subnet from the banned list.
Source§

fn set_network_active<'life0, 'async_trait>( &'life0 self, state: bool, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Disable/enable all p2p network activity.
Source§

fn get_peer_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<GetPeerInfoResult>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns data about each connected network node as an array of [PeerInfo].as_slice()[] Read more
Source§

fn ping<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Requests that a ping be sent to all other nodes, to measure ping time. Read more
Source§

fn send_raw_transaction<'life0, 'async_trait, R>( &'life0 self, tx: R, ) -> Pin<Box<dyn Future<Output = Result<Txid>> + Send + 'async_trait>>
where R: 'async_trait + RawTx + Send, Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn estimate_smart_fee<'life0, 'async_trait>( &'life0 self, conf_target: u16, estimate_mode: Option<EstimateMode>, ) -> Pin<Box<dyn Future<Output = Result<EstimateSmartFeeResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn wait_for_new_block<'life0, 'async_trait>( &'life0 self, timeout: u64, ) -> Pin<Box<dyn Future<Output = Result<BlockRef>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Waits for a specific new block and returns useful info about it. Returns the current block on timeout or exit. Read more
Source§

fn wait_for_block<'life0, 'life1, 'async_trait>( &'life0 self, blockhash: &'life1 BlockHash, timeout: u64, ) -> Pin<Box<dyn Future<Output = Result<BlockRef>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Waits for a specific new block and returns useful info about it. Returns the current block on timeout or exit. Read more
Source§

fn wallet_create_funded_psbt<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, inputs: &'life1 [CreateRawTransactionInput], outputs: &'life2 HashMap<String, Amount>, locktime: Option<i64>, options: Option<WalletCreateFundedPsbtOptions>, bip32derivs: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<WalletCreateFundedPsbtResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn wallet_process_psbt<'life0, 'life1, 'async_trait>( &'life0 self, psbt: &'life1 str, sign: Option<bool>, sighash_type: Option<SigHashType>, bip32derivs: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<WalletProcessPsbtResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_descriptor_info<'life0, 'life1, 'async_trait>( &'life0 self, desc: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<GetDescriptorInfoResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn join_psbt<'life0, 'life1, 'async_trait>( &'life0 self, psbts: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn combine_psbt<'life0, 'life1, 'async_trait>( &'life0 self, psbts: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn combine_raw_transaction<'life0, 'life1, 'async_trait>( &'life0 self, hex_strings: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn finalize_psbt<'life0, 'life1, 'async_trait>( &'life0 self, psbt: &'life1 str, extract: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<FinalizePsbtResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn derive_addresses<'life0, 'life1, 'async_trait>( &'life0 self, descriptor: &'life1 str, range: Option<[u32; 2]>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Address<NetworkUnchecked>>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn rescan_blockchain<'life0, 'async_trait>( &'life0 self, start_from: Option<usize>, stop_height: Option<usize>, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<usize>)>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn get_tx_out_set_info<'life0, 'async_trait>( &'life0 self, hash_type: Option<TxOutSetHashType>, hash_or_height: Option<HashOrHeight>, use_index: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetTxOutSetInfoResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns statistics about the unspent transaction output set. Note this call may take some time if you are not using coinstatsindex..await
Source§

fn get_net_totals<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetNetTotalsResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns information about network traffic, including bytes in, bytes out, and current time.
Source§

fn get_network_hash_ps<'life0, 'async_trait>( &'life0 self, nblocks: Option<u64>, height: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<f64>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns the estimated network hashes per second based on the last n blocks.
Source§

fn uptime<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns the total uptime of the server in seconds
Source§

fn submit_block<'life0, 'life1, 'async_trait>( &'life0 self, block: &'life1 Block, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Submit a block
Source§

fn submit_block_bytes<'life0, 'life1, 'async_trait>( &'life0 self, block_bytes: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Submit a raw block
Source§

fn submit_block_hex<'life0, 'life1, 'async_trait>( &'life0 self, block_hex: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Submit a block as a hex string
Source§

fn scan_tx_out_set_blocking<'life0, 'life1, 'async_trait>( &'life0 self, descriptors: &'life1 [ScanTxOutRequest], ) -> Pin<Box<dyn Future<Output = Result<ScanTxOutResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_zmq_notifications<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<GetZmqNotificationsResult>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns information about the active ZeroMQ notifications

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSend for T
where T: Send,