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
Sourcepub async fn new(url: String, auth: Auth) -> Result<Self>
pub async fn new(url: String, auth: Auth) -> Result<Self>
Creates a client to a bitcoind JSON-RPC server.
Can only return Err when using cookie authentication.
Sourcepub fn from_jsonrpc(client: Client) -> Client
pub fn from_jsonrpc(client: Client) -> Client
Create a new Client.
Sourcepub fn get_jsonrpc_client(&self) -> &Client
pub fn get_jsonrpc_client(&self) -> &Client
Get the underlying JSONRPC client.
Trait Implementations§
Source§impl RpcApi for Client
impl RpcApi for Client
Source§fn call<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
cmd: &'life1 str,
args: &'life2 [Value],
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>where
T: 'async_trait + for<'a> Deserialize<'a>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn call<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
cmd: &'life1 str,
args: &'life2 [Value],
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>where
T: 'async_trait + for<'a> Deserialize<'a>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Call an 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>>
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>>
Query an object implementing
Querable
typefn 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,
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,
fn add_multisig_address<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
nrequired: usize,
keys: &'life1 [PubKeyOrAddress<'life2>],
label: Option<&'life3 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,
'life3: 'async_trait,
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,
fn unload_wallet<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
fn get_block_header<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 BlockHash,
) -> Pin<Box<dyn Future<Output = Result<BlockHeader>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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,
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_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,
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,
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,
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,
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
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
fn import_multi<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
requests: &'life1 [ImportMultiRequest<'life2>],
options: Option<&'life3 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,
'life3: 'async_trait,
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,
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,
fn list_unspent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
minconf: Option<usize>,
maxconf: Option<usize>,
addresses: Option<&'life1 [&'life2 Address]>,
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,
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].
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,
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,
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,
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,
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>>
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>>
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>>
👎Deprecated
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>>
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>>
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>>
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,
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>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generate new address under own control
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,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockHash>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_to_address<'life0, 'life1, 'async_trait>(
&'life0 self,
block_num: u64,
address: &'life1 Address,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockHash>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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,
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,
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,
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_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,
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_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,
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
fn send_to_address<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
address: &'life1 Address,
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 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,
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
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,
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
fn send_raw_transaction<'life0, 'async_trait, R>( &'life0 self, tx: R, ) -> Pin<Box<dyn Future<Output = Result<Txid>> + Send + 'async_trait>>
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,
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,
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
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,
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,
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,
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,
fn derive_addresses<'life0, 'life1, 'async_trait>(
&'life0 self,
descriptor: &'life1 str,
range: Option<[u32; 2]>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Address>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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,
) -> Pin<Box<dyn Future<Output = Result<GetTxOutSetInfoResult>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn get_tx_out_set_info<'life0, 'async_trait>(
&'life0 self,
) -> 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.
This call may take some time.
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,
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,
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,
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
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,
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