BitcoindRpcApi

Trait BitcoindRpcApi 

Source
pub trait BitcoindRpcApi<C>
where C: SendRequest, Error<<C as SendRequest>::Error>: From<<C as SendRequest>::Error>,
{
Show 23 methods // Required method fn send_request<'life0, 'async_trait, P>( &'life0 self, request: String, ) -> Pin<Box<dyn Future<Output = Result<Response<P>, <C as SendRequest>::Error>> + Send + 'async_trait>> where P: 'async_trait + DeserializeOwned, Self: 'async_trait, 'life0: 'async_trait; // Provided methods fn createwallet<'life0, 'life1, 'async_trait>( &'life0 self, wallet_name: &'life1 str, disable_private_keys: Option<bool>, blank: Option<bool>, passphrase: Option<String>, avoid_reuse: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<LoadWalletResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn deriveaddresses<'life0, 'life1, 'async_trait>( &'life0 self, descriptor: &'life1 str, range: Option<[u64; 2]>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Address>, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn dumpwallet<'life0, 'life1, 'async_trait>( &'life0 self, filename: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<DumpWalletResponse, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn finalizepsbt<'life0, 'async_trait>( &'life0 self, psbt: PsbtBase64, ) -> Pin<Box<dyn Future<Output = Result<FinalizePsbtResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn generatetoaddress<'life0, 'async_trait>( &'life0 self, nblocks: u32, address: Address, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockHash>, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn getaddressinfo<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 Address, ) -> Pin<Box<dyn Future<Output = Result<GetAddressInfoResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn getbalance<'life0, 'async_trait>( &'life0 self, minconf: Option<u32>, include_watchonly: Option<bool>, avoid_reuse: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<f64, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn getblock<'life0, 'life1, 'async_trait>( &'life0 self, blockhash: &'life1 BlockHash, ) -> Pin<Box<dyn Future<Output = Result<GetBlockResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn getblockchaininfo<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetBlockchainInfoResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn getblockcount<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u32, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn getdescriptorinfo<'life0, 'life1, 'async_trait>( &'life0 self, descriptor: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<GetDescriptorInfoResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn getnewaddress<'life0, 'async_trait>( &'life0 self, label: Option<String>, address_type: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Address, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn gettransaction<'life0, 'async_trait>( &'life0 self, txid: Txid, ) -> Pin<Box<dyn Future<Output = Result<GetTransactionResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn getwalletinfo<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetWalletInfoResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn joinpsbts<'life0, 'life1, 'async_trait>( &'life0 self, txs: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<PsbtBase64, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn listunspent<'life0, 'async_trait>( &'life0 self, minconf: Option<u32>, maxconf: Option<u32>, addresses: Option<Vec<Address>>, include_unsafe: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ListUnspentResultEntry>, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn listwallets<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn sendrawtransaction<'life0, 'async_trait>( &'life0 self, hexstring: TransactionHex, ) -> Pin<Box<dyn Future<Output = Result<String, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn sendtoaddress<'life0, 'async_trait>( &'life0 self, address: Address, amount: f64, ) -> Pin<Box<dyn Future<Output = Result<String, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn sethdseed<'life0, 'async_trait>( &'life0 self, new_key_pool: Option<bool>, wif_private_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<(), Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn walletcreatefundedpsbt<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 [CreateRawTransactionInput], outputs: HashMap<String, f64>, ) -> Pin<Box<dyn Future<Output = Result<WalletCreateFundedPsbtResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn walletprocesspsbt<'life0, 'async_trait>( &'life0 self, psbt: PsbtBase64, ) -> Pin<Box<dyn Future<Output = Result<WalletProcessPsbtResponse, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... }
}

Required Methods§

Source

fn send_request<'life0, 'async_trait, P>( &'life0 self, request: String, ) -> Pin<Box<dyn Future<Output = Result<Response<P>, <C as SendRequest>::Error>> + Send + 'async_trait>>
where P: 'async_trait + DeserializeOwned, Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn createwallet<'life0, 'life1, 'async_trait>( &'life0 self, wallet_name: &'life1 str, disable_private_keys: Option<bool>, blank: Option<bool>, passphrase: Option<String>, avoid_reuse: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<LoadWalletResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Source

fn dumpwallet<'life0, 'life1, 'async_trait>( &'life0 self, filename: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<DumpWalletResponse, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn finalizepsbt<'life0, 'async_trait>( &'life0 self, psbt: PsbtBase64, ) -> Pin<Box<dyn Future<Output = Result<FinalizePsbtResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source

fn generatetoaddress<'life0, 'async_trait>( &'life0 self, nblocks: u32, address: Address, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockHash>, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source

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

Source

fn getbalance<'life0, 'async_trait>( &'life0 self, minconf: Option<u32>, include_watchonly: Option<bool>, avoid_reuse: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<f64, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source

fn getblock<'life0, 'life1, 'async_trait>( &'life0 self, blockhash: &'life1 BlockHash, ) -> Pin<Box<dyn Future<Output = Result<GetBlockResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Source

fn getblockcount<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u32, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source

fn getdescriptorinfo<'life0, 'life1, 'async_trait>( &'life0 self, descriptor: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<GetDescriptorInfoResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn getnewaddress<'life0, 'async_trait>( &'life0 self, label: Option<String>, address_type: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Address, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source

fn gettransaction<'life0, 'async_trait>( &'life0 self, txid: Txid, ) -> Pin<Box<dyn Future<Output = Result<GetTransactionResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source

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

Source

fn joinpsbts<'life0, 'life1, 'async_trait>( &'life0 self, txs: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<PsbtBase64, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn listunspent<'life0, 'async_trait>( &'life0 self, minconf: Option<u32>, maxconf: Option<u32>, addresses: Option<Vec<Address>>, include_unsafe: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ListUnspentResultEntry>, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source

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

Source

fn sendrawtransaction<'life0, 'async_trait>( &'life0 self, hexstring: TransactionHex, ) -> Pin<Box<dyn Future<Output = Result<String, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source

fn sendtoaddress<'life0, 'async_trait>( &'life0 self, address: Address, amount: f64, ) -> Pin<Box<dyn Future<Output = Result<String, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

amount is btc

Source

fn sethdseed<'life0, 'async_trait>( &'life0 self, new_key_pool: Option<bool>, wif_private_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<(), Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source

fn walletcreatefundedpsbt<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 [CreateRawTransactionInput], outputs: HashMap<String, f64>, ) -> Pin<Box<dyn Future<Output = Result<WalletCreateFundedPsbtResult, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Outputs are {address, btc amount}

Source

fn walletprocesspsbt<'life0, 'async_trait>( &'life0 self, psbt: PsbtBase64, ) -> Pin<Box<dyn Future<Output = Result<WalletProcessPsbtResponse, Error<<C as SendRequest>::Error>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§