pub struct WalletImpl { /* private fields */ }

Implementations§

source§

impl WalletImpl

source

pub fn new(context: &mut WalletContext, wallet: &Arc<Wallet>) -> Self

Trait Implementations§

source§

impl AbandonTransaction for WalletImpl

source§

fn abandon_transaction(&mut self, txid: &u256) -> bool

source§

impl AbortRescan for WalletImpl

source§

fn abort_rescan(&mut self)

source§

impl BackupWallet for WalletImpl

source§

fn backup_wallet(&self, filename: &String) -> bool

source§

impl CanGetAddresses for WalletImpl

source§

fn can_get_addresses(&self, internal: Option<bool>) -> bool

| Returns true if the wallet can give out | new addresses. This means it has keys | in the keypool or can generate new keys |
source§

impl ChangeWalletPassphrase for WalletImpl

source§

fn change_wallet_passphrase( &mut self, old_wallet_passphrase: &SecureString, new_wallet_passphrase: &SecureString ) -> bool

source§

impl CommitBumpTransaction for WalletImpl

source§

fn commit_bump_transaction( &mut self, txid: &u256, mtx: MutableTransaction, errors: &mut Vec<BilingualStr>, bumped_txid: &mut u256 ) -> bool

source§

impl CommitTransaction for WalletImpl

source§

fn commit_transaction( &mut self, tx: TransactionRef, value_map: WalletValueMap, order_form: WalletOrderForm )

source§

impl CreateBumpTransaction for WalletImpl

source§

fn create_bump_transaction( &mut self, txid: &u256, coin_control: &CoinControl, errors: &mut Vec<BilingualStr>, old_fee: &mut Amount, new_fee: &mut Amount, mtx: &mut MutableTransaction ) -> bool

source§

impl CreateTransaction for WalletImpl

source§

fn create_transaction( &mut self, recipients: &Vec<Recipient>, coin_control: &CoinControl, sign: bool, change_pos: &mut i32, fee: &mut Amount, fail_reason: &mut BilingualStr ) -> TransactionRef

source§

impl DelAddressBook for WalletImpl

source§

fn del_address_book(&mut self, dest: &TxDestination) -> bool

| Remove address. |
source§

impl DisplayAddress for WalletImpl

source§

fn display_address(&mut self, dest: &TxDestination) -> bool

| Display address on external signer |
source§

impl EncryptWallet for WalletImpl

source§

fn encrypt_wallet(&mut self, wallet_passphrase: &SecureString) -> bool

source§

impl GetAddress for WalletImpl

source§

fn get_address( &mut self, dest: &TxDestination, name: *mut String, is_mine: *mut IsMineType, purpose: *mut String ) -> bool

| Look up address in wallet, return whether | exists. |
source§

impl GetAddressReceiveRequests for WalletImpl

source§

fn get_address_receive_requests(&self) -> Vec<String>

| Get receive requests. |
source§

impl GetAddresses for WalletImpl

source§

fn get_addresses(&mut self) -> Vec<WalletAddress>

| Get wallet address list. |
source§

impl GetAvailableBalance for WalletImpl

source§

fn get_available_balance(&mut self, coin_control: &CoinControl) -> Amount

source§

impl GetBalance for WalletImpl

source§

fn get_balance(&mut self) -> Amount

source§

impl GetBalances for WalletImpl

source§

impl GetCoins for WalletImpl

source§

fn get_coins(&mut self, outputs: &Vec<OutPoint>) -> Vec<WalletTxOut>

| Return wallet transaction output information. |
source§

impl GetConfirmTarget for WalletImpl

source§

fn get_confirm_target(&mut self) -> u32

| Get tx confirm target. |
source§

impl GetCredit for WalletImpl

source§

fn get_credit(&mut self, txout: &TxOut, filter: IsMineFilter) -> Amount

| Return credit amount if transaction | input belongs to wallet. |
source§

impl GetDebit for WalletImpl

source§

fn get_debit(&mut self, txin: &TxIn, filter: IsMineFilter) -> Amount

| Return debit amount if transaction | input belongs to wallet. |
source§

impl GetDefaultAddressType for WalletImpl

source§

fn get_default_address_type(&mut self) -> OutputType

| Get default address type. |
source§

impl GetDefaultMaxTxFee for WalletImpl

source§

fn get_default_max_tx_fee(&mut self) -> Amount

| Get max tx fee. |
source§

impl GetMinimumFee for WalletImpl

source§

fn get_minimum_fee( &mut self, tx_bytes: u32, coin_control: &CoinControl, returned_target: *mut i32, reason: *mut FeeReason ) -> Amount

source§

impl GetPubKeyWithScriptAndAddress for WalletImpl

source§

fn get_pub_key_with_script_and_address( &mut self, script: &Script, address: &KeyID, pub_key: &mut PubKey ) -> bool

| Get public key. |
source§

impl GetRequiredFee for WalletImpl

source§

fn get_required_fee(&mut self, tx_bytes: u32) -> Amount

source§

impl GetTx for WalletImpl

source§

fn get_tx(&mut self, txid: &u256) -> TransactionRef

| Get a transaction. |
source§

impl GetWallet for WalletImpl

source§

fn wallet(&mut self) -> Rc<RefCell<dyn WalletInterface>>

| Return pointer to internal wallet class, | useful for testing. |
source§

impl GetWalletName for WalletImpl

source§

impl GetWalletTx for WalletImpl

source§

fn get_wallet_tx(&self, txid: &u256) -> WalletTx

| Get transaction information. |
source§

impl GetWalletTxDetails for WalletImpl

source§

fn get_wallet_tx_details( &mut self, txid: &u256, tx_status: &mut WalletTxStatus, order_form: &mut WalletOrderForm, in_mempool: &mut bool, num_blocks: &mut i32 ) -> WalletTx

| Get transaction details. |
source§

impl GetWalletTxs for WalletImpl

source§

fn get_wallet_txs(&mut self) -> Vec<WalletTx>

| Get list of all wallet transactions. |
source§

impl HandleAddressBookChanged for WalletImpl

source§

fn handle_address_book_changed( &mut self, fn_: WalletAddressBookChangedFn ) -> Box<dyn Handler>

| Register handler for address book changed | messages. |
source§

impl HandleCanGetAddressesChanged for WalletImpl

source§

fn handle_can_get_addresses_changed( &mut self, fn_: WalletCanGetAddressesChangedFn ) -> Box<dyn Handler>

| Register handler for keypool changed | messages. |
source§

impl HandleShowProgress for WalletImpl

§

type Callback = fn(_: &String, _: i32)

source§

fn handle_show_progress(&mut self, fn_: Self::Callback) -> Box<dyn Handler>

| Register handler for progress messages. |
source§

impl HandleStatusChanged for WalletImpl

source§

fn handle_status_changed( &mut self, fn_: WalletStatusChangedFn ) -> Box<dyn Handler>

| Register handler for status changed | messages. |
source§

impl HandleTransactionChanged for WalletImpl

source§

fn handle_transaction_changed( &mut self, fn_: WalletTransactionChangedFn ) -> Box<dyn Handler>

| Register handler for transaction changed | messages. |
source§

impl HandleUnload for WalletImpl

source§

fn handle_unload(&mut self, fn_: WalletUnloadFn) -> Box<dyn Handler>

| Register handler for unload message. |
source§

impl HandleWatchOnlyChanged for WalletImpl

source§

fn handle_watch_only_changed( &mut self, fn_: WalletWatchOnlyChangedFn ) -> Box<dyn Handler>

| Register handler for watchonly changed | messages. |
source§

impl HasExternalSigner for WalletImpl

source§

fn has_external_signer(&mut self) -> bool

| Return whether wallet uses an external | signer. |
source§

impl HaveWatchOnly for WalletImpl

source§

fn have_watch_only(&mut self) -> bool

| Return whether wallet has watch only | keys. |
source§

impl HdEnabled for WalletImpl

source§

fn hd_enabled(&mut self) -> bool

| Return whether HD enabled. |
source§

impl IsCrypted for WalletImpl

source§

fn is_crypted(&self) -> bool

| Return whether wallet is encrypted. |
source§

impl IsLegacy for WalletImpl

source§

fn is_legacy(&self) -> bool

| Return whether is a legacy wallet |
source§

impl IsLocked for WalletImpl

source§

fn is_locked(&self) -> bool

| Return whether wallet is locked. |
source§

impl IsLockedCoin for WalletImpl

source§

fn is_locked_coin(&mut self, output: &OutPoint) -> bool

| Return whether coin is locked. |
source§

impl IsSpendable for WalletImpl

source§

fn is_spendable(&mut self, dest: &TxDestination) -> bool

| Return whether wallet has private key. |
source§

impl ListCoins for WalletImpl

source§

fn list_coins(&mut self) -> CoinsList

| Return AvailableCoins + LockedCoins | grouped by wallet address. (put change | in one group with wallet address) |
source§

impl ListLockedCoins for WalletImpl

source§

fn list_locked_coins(&self, outputs: &mut Vec<OutPoint>)

source§

impl Lock for WalletImpl

source§

fn lock(&mut self) -> bool

| Lock wallet. |
source§

impl LockCoin for WalletImpl

source§

fn lock_coin(&mut self, output: &OutPoint, write_to_db: bool) -> bool

source§

fn lock_coin_with_batch( &mut self, output: &OutPoint, batch: Option<*mut WalletBatch> ) -> bool

source§

impl PrivateKeysDisabled for WalletImpl

source§

fn private_keys_disabled(&mut self) -> bool

| Return whether private keys enabled. |
source§

impl Remove for WalletImpl

source§

fn remove(&mut self)

| Remove wallet. |
source§

impl SetAddressBook for WalletImpl

source§

fn set_address_book( &mut self, dest: &TxDestination, name: &String, purpose: &String ) -> bool

| Add or update address. |
source§

impl SetAddressReceiveRequest for WalletImpl

source§

fn set_address_receive_request( &mut self, dest: &TxDestination, id: &String, value: &String ) -> bool

| Save or remove receive request. |
source§

impl SignBumpTransaction for WalletImpl

source§

impl SignMessage for WalletImpl

source§

fn sign_message( &self, message: &String, pkhash: &PKHash, str_sig: &mut String ) -> SigningResult

| Sign a message with the given script |
source§

impl TransactionCanBeAbandoned for WalletImpl

source§

fn transaction_can_be_abandoned(&self, txid: &u256) -> bool

| Return whether transaction can be abandoned. |
source§

impl TransactionCanBeBumped for WalletImpl

source§

fn transaction_can_be_bumped(&self, txid: &u256) -> bool

| Return whether transaction can be bumped. |
source§

impl TryGetBalances for WalletImpl

source§

fn try_get_balances( &mut self, balances: &mut WalletBalances, block_hash: &mut u256 ) -> bool

| Get balances if possible without blocking. |
source§

impl TryGetTxStatus for WalletImpl

source§

fn try_get_tx_status( &mut self, txid: &u256, tx_status: &mut WalletTxStatus, num_blocks: &mut i32, block_time: &mut i64 ) -> bool

| Try to get updated status for a particular | transaction, if possible without blocking. |
source§

impl TxinIsMine for WalletImpl

source§

fn txin_is_mine(&mut self, txin: &TxIn) -> IsMineType

| Return whether transaction input belongs | to wallet. |
source§

impl TxoutIsMine for WalletImpl

source§

fn txout_is_mine(&mut self, txout: &TxOut) -> IsMineType

| Return whether transaction output | belongs to wallet. |
source§

impl Unlock for WalletImpl

source§

fn unlock( &mut self, wallet_passphrase: &SecureString, _accept_no_keys: Option<bool> ) -> bool

| Unlock wallet. |
source§

impl UnlockCoin for WalletImpl

source§

fn unlock_coin(&mut self, output: &OutPoint) -> bool

source§

impl WalletFillPSBT for WalletImpl

source§

fn fill_psbt( &mut self, sighash_type: i32, sign: bool, bip_32derivs: bool, n_signed: *mut usize, psbtx: &mut PartiallySignedTransaction, complete: &mut bool ) -> TransactionError

source§

impl WalletGetNewDestination for WalletImpl

source§

fn get_new_destination( &mut self, ty: OutputType, label: String, dest: &mut TxDestination, _error: &mut BilingualStr ) -> bool

| Get a new address. |
source§

impl WalletInterface for WalletImpl

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
§

impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,

§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> StaticUpcast<T> for T

§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
§

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

§

fn vzip(self) -> V