pub struct Wallet {
pub client: Client,
/* private fields */
}Expand description
A wrapper to bitcoind wallet
Fields§
§client: ClientImplementations§
Source§impl Wallet
impl Wallet
Sourcepub async fn new(name: &str, url: Url) -> Result<Self>
pub async fn new(name: &str, url: Url) -> Result<Self>
Create a wallet on the bitcoind instance or use the wallet with the same name if it exists.
pub async fn info(&self) -> Result<GetWalletInfoResult>
pub async fn median_time(&self) -> Result<u64>
pub async fn block_height(&self) -> Result<u32>
👎Deprecated since 0.3.0: please directly use
client.getblockcount insteadpub async fn new_address(&self) -> Result<Address>
pub async fn balance(&self) -> Result<Amount>
pub async fn send_to_address( &self, address: Address, amount: Amount, ) -> Result<Txid>
pub async fn send_raw_transaction( &self, transaction: Transaction, ) -> Result<Txid>
pub async fn get_raw_transaction(&self, txid: Txid) -> Result<Transaction>
pub async fn get_wallet_transaction( &self, txid: Txid, ) -> Result<GetTransactionResult>
pub async fn address_info( &self, address: &Address, ) -> Result<GetAddressInfoResult>
pub async fn list_unspent(&self) -> Result<Vec<ListUnspentResultEntry>>
pub async fn fund_psbt( &self, address: Address, amount: Amount, ) -> Result<String>
pub async fn join_psbts(&self, psbts: &[String]) -> Result<PsbtBase64>
pub async fn wallet_process_psbt( &self, psbt: PsbtBase64, ) -> Result<WalletProcessPsbtResponse>
pub async fn finalize_psbt( &self, psbt: PsbtBase64, ) -> Result<FinalizePsbtResult>
pub async fn transaction_block_height(&self, txid: Txid) -> Result<Option<u32>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Wallet
impl !RefUnwindSafe for Wallet
impl Send for Wallet
impl Sync for Wallet
impl Unpin for Wallet
impl !UnwindSafe for Wallet
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