pub struct BitcoinClient { /* private fields */ }Implementations§
Source§impl BitcoinClient
impl BitcoinClient
pub fn new(url: &str, username: &str, password: &str) -> Self
pub fn new_local(network: BitcoinClientType) -> Self
pub async fn get_blockchain_info(&self) -> Result<BlockchainInfo>
pub async fn get_block_count(&self) -> Result<u64>
pub async fn get_best_block_hash(&self) -> Result<String>
pub async fn get_block(&self, block_hash: &str, verbosity: u8) -> Result<Block>
pub async fn get_block_hash(&self, height: u64) -> Result<String>
pub async fn get_block_header( &self, block_hash: &str, verbose: bool, ) -> Result<BlockHeader>
pub async fn get_chain_tips(&self) -> Result<Vec<ChainTip>>
pub async fn get_difficulty(&self) -> Result<f64>
pub async fn get_raw_transaction( &self, txid: &str, verbose: bool, ) -> Result<Transaction>
pub async fn decode_raw_transaction( &self, tx_hex: &str, ) -> Result<DecodedTransaction>
pub async fn send_raw_transaction(&self, tx_hex: &str) -> Result<String>
pub async fn get_tx_out( &self, txid: &str, vout: u32, include_mempool: bool, ) -> Result<Option<TxOut>>
pub async fn get_tx_out_set_info(&self) -> Result<TxOutSetInfo>
pub async fn get_wallet_info(&self) -> Result<WalletInfo>
pub async fn get_balance( &self, dummy: &str, min_conf: i32, include_watchonly: bool, ) -> Result<f64>
pub async fn get_new_address( &self, label: Option<&str>, address_type: Option<&str>, ) -> Result<String>
pub async fn get_addresses_by_label( &self, label: &str, ) -> Result<HashMap<String, AddressInfo>>
pub async fn validate_address(&self, address: &str) -> Result<ValidateAddress>
pub async fn send_to_address( &self, address: &str, amount: f64, ) -> Result<String>
pub async fn list_unspent( &self, min_conf: i32, max_conf: i32, addresses: Option<Vec<&str>>, ) -> Result<Vec<Utxo>>
pub async fn get_network_info(&self) -> Result<NetworkInfo>
pub async fn get_peer_info(&self) -> Result<Vec<PeerInfo>>
pub async fn get_network_hash_ps( &self, nblocks: Option<i32>, height: Option<i32>, ) -> Result<f64>
pub async fn get_mempool_info(&self) -> Result<MempoolInfo>
pub async fn get_raw_mempool(&self, verbose: bool) -> Result<Vec<String>>
pub async fn estimate_smart_fee(&self, conf_target: i32) -> Result<FeeEstimate>
pub async fn get_mining_info(&self) -> Result<MiningInfo>
pub async fn generate_to_address( &self, nblocks: u32, address: &str, ) -> Result<Vec<String>>
pub async fn create_raw_transaction( &self, inputs: Vec<CreateTxInput>, outputs: HashMap<String, f64>, ) -> Result<String>
pub async fn sign_raw_transaction_with_wallet( &self, tx_hex: &str, ) -> Result<SignedTransaction>
pub async fn get_block_stats(&self, height: u64) -> Result<BlockStats>
pub async fn batch_call( &self, requests: Vec<(String, Value)>, ) -> Result<Vec<Value>>
Trait Implementations§
Source§impl Clone for BitcoinClient
impl Clone for BitcoinClient
Auto Trait Implementations§
impl !RefUnwindSafe for BitcoinClient
impl !UnwindSafe for BitcoinClient
impl Freeze for BitcoinClient
impl Send for BitcoinClient
impl Sync for BitcoinClient
impl Unpin for BitcoinClient
impl UnsafeUnpin for BitcoinClient
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