pub struct Wallet { /* private fields */ }
Expand description

| A Wallet maintains a set of transactions | and balances, and provides the ability | to create new transactions. |

Implementations§

source§

impl Wallet

source

pub fn new<'a>( chain: &'a mut dyn ChainInterface, name: &str, database: Box<WalletDatabase> ) -> Self

| Construct wallet with specified name | and database implementation. |

Trait Implementations§

source§

impl AbandonTransaction for Wallet

source§

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

| Mark a transaction (and it in-wallet | descendants) as abandoned so its inputs | may be respent. |

source§

impl AbortRescan for Wallet

source§

fn abort_rescan(&mut self)

source§

impl AddActiveScriptPubKeyMan for Wallet

source§

fn add_active_script_pub_key_man( &mut self, id: u256, ty: OutputType, internal: bool )

| Adds the active ScriptPubKeyMan for | the specified type and internal. Writes | it to the wallet file | | ———– | @param[in] id | | The unique id for the ScriptPubKeyMan | ––––– | @param[in] type | | The OutputType this ScriptPubKeyMan | provides addresses for | ––––– | @param[in] internal | | Whether this ScriptPubKeyMan provides | change addresses |

source§

impl AddToSpends for Wallet

source§

fn add_to_spends(&mut self, wtxid: &u256, batch: Option<*mut WalletBatch>)

source§

impl AddToSpendsWithOutpoint for Wallet

source§

fn add_to_spends_with_outpoint( &mut self, outpoint: &OutPoint, wtxid: &u256, batch: Option<*mut WalletBatch> )

source§

impl AddToWallet for Wallet

source§

fn add_to_wallet( &mut self, tx: TransactionRef, confirm: &WalletTxConfirmation, update_wtx: Option<&WalletUpdateWalletTxFn>, flush_on_close: Option<bool>, rescanning_old_block: Option<bool> ) -> *mut WalletTx

source§

impl AddToWalletIfInvolvingMe for Wallet

source§

fn add_to_wallet_if_involving_me( &mut self, tx: &TransactionRef, confirm: WalletTxConfirmation, update: bool, rescanning_old_block: bool ) -> bool

| Add a transaction to the wallet, or update | it. confirm.block_* should be set when | the transaction was known to be included | in a block. When block_hash.IsNull(), | then wallet state is not updated in AddToWallet, | but notifications happen and cached | balances are marked dirty. | | If fUpdate is true, existing transactions | will be updated. | | TODO: One exception to this is that the | abandoned state is cleared under the | assumption that any further notification | of a transaction that was considered | abandoned is an indication that it is | not safe to be considered abandoned. | | Abandoned state should probably be | more carefully tracked via different | chain notifications or by checking | mempool presence when necessary. | | Should be called with rescanning_old_block | set to true, if the transaction is not | discovered in real time, but during | a rescan of old blocks. |

source§

impl AddWalletDescriptor for Wallet

source§

fn add_wallet_descriptor( &mut self, desc: &mut WalletDescriptor, signing_provider: &FlatSigningProvider, label: &String, internal: bool ) -> *mut ScriptPubKeyMan

| Add a descriptor to the wallet, return | a ScriptPubKeyMan & associated output | type |

source§

impl AddWalletFlags for Wallet

source§

fn add_wallet_flags(&mut self, flags: u64) -> bool

| overwrite all flags by the given uint64_t | returns false if unknown, non-tolerable | flags are present |

source§

impl AttachChain for Wallet

source§

fn attach_chain<'a>( wallet: &Arc<Wallet>, chain: &'a mut dyn ChainInterface, rescan_required: bool, error: &mut BilingualStr, warnings: &mut Vec<BilingualStr> ) -> bool

| Catch wallet up to current chain, scanning | new blocks, updating the best block | locator and m_last_block_processed, | and registering for notifications | about new blocks and transactions. |

source§

impl BackupWallet for Wallet

source§

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

source§

impl BlockConnected for Wallet

source§

fn block_connected(&mut self, block: Arc<Block>, pindex: Arc<BlockIndex>)

| Notifies listeners of a block being | connected. | | Provides a vector of transactions evicted | from the mempool as a result. | | Called on a background thread. |
source§

impl BlockDisconnected for Wallet

source§

fn block_disconnected(&mut self, block: Arc<Block>, pindex: Arc<BlockIndex>)

| Notifies listeners of a block being | disconnected | | Called on a background thread. |
source§

impl BlockUntilSyncedToCurrentChain for Wallet

source§

fn block_until_synced_to_current_chain(&self)

| Blocks until the wallet state is up-to-date | to /at least/ the current chain at the | time this function is entered | | Obviously holding cs_main/cs_wallet | when going into this call may cause deadlock |

source§

impl CanGetAddresses for Wallet

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 CanSupportFeature for Wallet

source§

fn can_support_feature(&self, wf: WalletFeature) -> bool

| check whether we support the named feature |

source§

impl ChainStateFlushed for Wallet

source§

fn chain_state_flushed(&mut self, loc: &BlockLocator)

| Notifies listeners of the new active | block chain on-disk. | | Prior to this callback, any updates | are not guaranteed to persist on disk | (ie clients need to handle shutdown/restart | safety by being able to understand when | some updates were lost due to unclean | shutdown). | | When this callback is invoked, the validation | changes done by any prior callback are | guaranteed to exist on disk and survive | a restart, including an unclean shutdown. | | Provides a locator describing the best | chain, which is likely useful for storing | current state on disk in client DBs. | | Called on a background thread. |
source§

impl ChangeWalletPassphrase for Wallet

source§

fn change_wallet_passphrase( &mut self, str_old_wallet_passphrase: &SecureString, str_new_wallet_passphrase: &SecureString ) -> bool

source§

impl CheckIsLockedCoinWithHash for Wallet

source§

impl Close for Wallet

source§

fn close(&mut self)

| Close wallet database |

source§

impl CommitTransaction for Wallet

source§

fn commit_transaction( &mut self, tx: TransactionRef, map_value: MapValue, order_form: Vec<(String, String)> )

| Submit the transaction to the node’s | mempool and then relay to peers. | | Should be called after CreateTransaction | unless you want to abort broadcasting | the transaction. | | ———– | @param[in] tx | | The transaction to be broadcast. | ––––– | @param[in] mapValue | | key-values to be set on the transaction. | ––––– | @param[in] orderForm | | BIP 70 / BIP 21 order form details to be | set on the transaction. |

source§

impl ComputeTimeSmart for Wallet

source§

fn compute_time_smart(&self, wtx: &WalletTx, rescanning_old_block: bool) -> u32

source§

impl ConnectScriptPubKeyManNotifiers for Wallet

source§

fn connect_script_pub_key_man_notifiers(&mut self)

| Connect the signals from ScriptPubKeyMans | to the signals in CWallet |

source§

impl Create for Wallet

source§

fn create( context: &mut WalletContext, name: &String, database: Box<WalletDatabase>, wallet_creation_flags: u64, error: &mut BilingualStr, warnings: &mut Vec<BilingualStr> ) -> Arc<Wallet>

| Initializes the wallet, returns a new | CWallet instance or a null pointer in | case of an error |

source§

impl DeactivateScriptPubKeyMan for Wallet

source§

fn deactivate_script_pub_key_man( &mut self, id: u256, ty: OutputType, internal: bool )

| Remove specified ScriptPubKeyMan | from set of active SPK managers. Writes | the change to the wallet file. | | ———– | @param[in] id | | The unique id for the ScriptPubKeyMan | ––––– | @param[in] type | | The OutputType this ScriptPubKeyMan | provides addresses for | ––––– | @param[in] internal | | Whether this ScriptPubKeyMan provides | change addresses |

source§

impl DelAddressBook for Wallet

source§

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

| Remove address. |
source§

impl DisplayAddress for Wallet

source§

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

| Display address on an external signer. | Returns false if external signer support | is not compiled |

source§

impl Drop for Wallet

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl DummySignTx for Wallet

source§

fn dummy_sign_tx( &self, tx_new: &mut MutableTransaction, txouts: &HashSet<TxOut>, coin_control: Option<*const CoinControl> ) -> bool

source§

impl EncryptWallet for Wallet

source§

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

source§

impl FindAddressBookEntry for Wallet

source§

impl Flush for Wallet

source§

fn flush(&mut self)

| Flush wallet (bitdb flush) |

source§

impl GetActiveScriptPubKeyMans for Wallet

source§

fn get_active_script_pub_key_mans(&self) -> HashSet<*mut ScriptPubKeyMan>

| Returns all unique ScriptPubKeyMans | in m_internal_spk_managers and m_external_spk_managers |

source§

impl GetAddressReceiveRequests for Wallet

source§

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

| Get receive requests. |
source§

impl GetAllScriptPubKeyMans for Wallet

source§

fn get_all_script_pub_key_mans(&self) -> HashSet<*mut ScriptPubKeyMan>

| Returns all unique ScriptPubKeyMans |

source§

impl GetBroadcastTransactions for Wallet

source§

fn get_broadcast_transactions(&self) -> bool

| Inquire whether this wallet broadcasts | transactions. |

source§

impl GetConflicts for Wallet

source§

fn get_conflicts(&self, txid: &u256) -> HashSet<u256>

| Get wallet transactions that conflict | with given transaction (spend same | outputs) |

source§

impl GetDatabase for Wallet

source§

impl GetDebitWithTxAndFilter for Wallet

source§

impl GetDebitWithTxinAndFilter for Wallet

source§

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

| Returns amount of debit if the input | matches the filter, otherwise returns | 0 |

source§

impl GetDescriptorScriptPubKeyMan for Wallet

source§

fn get_descriptor_script_pub_key_man( &self, desc: &WalletDescriptor ) -> *mut DescriptorScriptPubKeyMan

| Return the DescriptorScriptPubKeyMan | for a WalletDescriptor if it is already | in the wallet |

source§

impl GetDisplayName for Wallet

source§

fn get_display_name(&self) -> String

| Returns a bracketed wallet name for | displaying in logs, will return [default | wallet] if the wallet has no name |

source§

impl GetEncryptionKey for Wallet

source§

impl GetKeyBirthTimes for Wallet

source§

fn get_key_birth_times(&self, map_key_birth: &mut HashMap<KeyID, i64>)

source§

impl GetKeyPoolSize for Wallet

source§

impl GetLabelAddresses for Wallet

source§

fn get_label_addresses(&self, label: &String) -> HashSet<TxDestination>

source§

impl GetLastBlockHash for Wallet

source§

impl GetLastBlockHeight for Wallet

source§

fn get_last_block_height(&self) -> i32

| Get last block processed height |

source§

impl GetLegacyScriptPubKeyMan for Wallet

source§

fn get_legacy_script_pub_key_man(&self) -> *mut LegacyScriptPubKeyMan

| Get the LegacyScriptPubKeyMan which | is used for all types, internal, and | external. |

source§

impl GetName for Wallet

source§

fn get_name(&self) -> &'static str

| Get a name for this wallet for logging/debugging | purposes. |

source§

impl GetNewChangeDestination for Wallet

source§

fn get_new_change_destination( &mut self, ty: OutputType, dest: &mut TxDestination, error: &mut BilingualStr ) -> bool

source§

impl GetOldestKeyPoolTime for Wallet

source§

impl GetOrCreateLegacyScriptPubKeyMan for Wallet

source§

impl GetScriptPubKeyMan for Wallet

source§

fn get_script_pub_key_man( &self, ty: &OutputType, internal: bool ) -> *mut ScriptPubKeyMan

| Get the ScriptPubKeyMan for the given | OutputType and internal/external | chain. |

source§

impl GetScriptPubKeyManWithId for Wallet

source§

fn get_script_pub_key_man_with_id(&self, id: &u256) -> *mut ScriptPubKeyMan

| Get the ScriptPubKeyMan by id |

source§

impl GetScriptPubKeyManWithScript for Wallet

source§

fn get_script_pub_key_man_with_script( &self, script: &Script ) -> *mut ScriptPubKeyMan

| Get the ScriptPubKeyMan for a script |

source§

impl GetScriptPubKeyMans for Wallet

source§

fn get_script_pub_key_mans( &self, script: &Script, sigdata: &mut SignatureData ) -> HashSet<*mut ScriptPubKeyMan>

| Get all of the ScriptPubKeyMans for | a script given additional information | in sigdata (populated by e.g. a psbt) |

source§

impl GetSolvingProvider for Wallet

source§

fn get_solving_provider(&self, script: &Script) -> Box<SigningProvider>

| Get the SigningProvider for a script |

source§

impl GetSolvingProviderWithSigdata for Wallet

source§

impl GetTxBlocksToMaturity for Wallet

source§

fn get_tx_blocks_to_maturity(&self, wtx: &WalletTx) -> i32

| @return | | number of blocks to maturity for this | transaction: | | 0 : is not a coinbase transaction, or | is a mature coinbase transaction | | >0 : is a coinbase transaction which | matures in this many blocks |

source§

impl GetTxConflicts for Wallet

source§

fn get_tx_conflicts(&self, wtx: &WalletTx) -> HashSet<u256>

| TODO: Remove “NO_THREAD_SAFETY_ANALYSIS” | and replace it with the correct annotation | “EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet)”. | | The annotation “NO_THREAD_SAFETY_ANALYSIS” | was temporarily added to avoid having to | resolve the issue of member access into | incomplete type CWallet. | | Note that we still have the runtime check | “AssertLockHeld(pwallet->cs_wallet)” in | place.

source§

impl GetTxDepthInMainChain for Wallet

source§

fn get_tx_depth_in_main_chain(&self, wtx: &WalletTx) -> i32

| Return depth of transaction in blockchain: | | <0 : conflicts with a transaction this | deep in the blockchain | | 0 : in memory pool, waiting to be included | in a block | | >=1 : this many blocks deep in the main | chain |

source§

impl GetVersion for Wallet

source§

fn get_version(&self) -> i32

| get the current wallet format (the oldest | client version guaranteed to understand | this wallet) |

source§

impl GetWalletTx for Wallet

source§

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

| Get transaction information. |
source§

impl HasEncryptionKeys for Wallet

source§

impl HasWalletSpend for Wallet

source§

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

| Check if a given transaction has any | of its outputs spent by another transaction | in the wallet |

source§

impl HaveChain for Wallet

source§

fn have_chain(&self) -> bool

| Interface to assert chain access |

source§

impl ImportPrivKeys for Wallet

source§

fn import_priv_keys( &mut self, privkey_map: &HashMap<KeyID, Key>, timestamp: i64 ) -> bool

source§

impl ImportPubKeys for Wallet

source§

fn import_pub_keys( &mut self, ordered_pubkeys: &Vec<KeyID>, pubkey_map: &HashMap<KeyID, PubKey>, key_origins: &HashMap<KeyID, (PubKey, KeyOriginInfo)>, add_keypool: bool, internal: bool, timestamp: i64 ) -> bool

source§

impl ImportScriptPubKeys for Wallet

source§

fn import_script_pub_keys( &mut self, label: &String, script_pub_keys: &HashSet<Script>, have_solving_data: bool, apply_label: bool, timestamp: i64 ) -> bool

source§

impl ImportScripts for Wallet

source§

fn import_scripts(&mut self, scripts: HashSet<Script>, timestamp: i64) -> bool

source§

impl IncOrderPosNext for Wallet

source§

fn inc_order_pos_next(&mut self, batch: Option<*mut WalletBatch>) -> i64

| Increment the next transaction order | id | | ———– | @return | | next transaction order id |

source§

impl IsAbortingRescan for Wallet

source§

impl IsAddressUsed for Wallet

source§

impl IsCrypted for Wallet

source§

fn is_crypted(&self) -> bool

| Return whether wallet is encrypted. |
source§

impl IsFromMe for Wallet

source§

fn is_from_me(&self, tx: &Transaction) -> bool

| should probably be renamed to IsRelevantToMe |

source§

impl IsHDEnabled for Wallet

source§

fn is_hd_enabled(&self) -> bool

| Returns true if HD is enabled |

source§

impl IsLegacy for Wallet

source§

fn is_legacy(&self) -> bool

| Determine if we are a legacy wallet |

source§

impl IsLocked for Wallet

source§

fn is_locked(&self) -> bool

| Return whether wallet is locked. |
source§

impl IsMineWithScript for Wallet

source§

impl IsMineWithTx for Wallet

source§

impl IsMineWithTxDest for Wallet

source§

impl IsMineWithTxout for Wallet

source§

impl IsScanning for Wallet

source§

impl IsSpent for Wallet

source§

fn is_spent(&self, hash: &u256, n: u32) -> bool

source§

impl IsSpentKey for Wallet

source§

fn is_spent_key(&self, hash: &u256, n: u32) -> bool

| Whether this or any known UTXO with the | same single key has been spent. |

source§

impl IsTxImmatureCoinBase for Wallet

source§

impl IsTxInMainChain for Wallet

source§

impl IsWalletFlagSet for Wallet

source§

fn is_wallet_flag_set(&self, flag: u64) -> bool

| check if a certain wallet flag is set |

source§

impl KeypoolCountExternalKeys for Wallet

source§

impl ListLockedCoins for Wallet

source§

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

source§

impl LoadActiveScriptPubKeyMan for Wallet

source§

fn load_active_script_pub_key_man( &mut self, id: u256, ty: OutputType, internal: bool )

| Loads an active ScriptPubKeyMan for | the specified type and internal. (used | by LoadWallet) | | ———– | @param[in] id | | The unique id for the ScriptPubKeyMan | ––––– | @param[in] type | | The OutputType this ScriptPubKeyMan | provides addresses for | ––––– | @param[in] internal | | Whether this ScriptPubKeyMan provides | change addresses |

source§

impl LoadDescriptorScriptPubKeyMan for Wallet

source§

fn load_descriptor_script_pub_key_man( &mut self, id: u256, desc: &mut WalletDescriptor )

| Instantiate a descriptor ScriptPubKeyMan | from the WalletDescriptor and load | it |

source§

impl LoadDestData for Wallet

source§

fn load_dest_data(&mut self, dest: &TxDestination, key: &String, value: &String)

| Adds a destination data tuple to the | store, without saving it to disk |

source§

impl LoadMinVersion for Wallet

source§

fn load_min_version(&mut self, n_version: i32) -> bool

source§

impl LoadToWallet for Wallet

source§

fn load_to_wallet( &mut self, hash: &u256, fill_wtx: &WalletUpdateWalletTxFn ) -> bool

source§

impl LoadWallet for Wallet

source§

fn load_wallet(&mut self) -> DBErrors

source§

impl LoadWalletFlags for Wallet

source§

fn load_wallet_flags(&mut self, flags: u64) -> bool

| Loads the flags into the wallet. (used | by LoadWallet) |

source§

impl Lock for Wallet

source§

fn lock(&mut self) -> bool

| Lock wallet. |
source§

impl LockCoin for Wallet

source§

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

source§

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

source§

impl MarkConflicted for Wallet

source§

fn mark_conflicted( &mut self, hash_block: &u256, conflicting_height: i32, hash_tx: &u256 )

| Mark a transaction (and its in-wallet | descendants) as conflicting with a | particular block. |

source§

impl MarkDestinationsDirty for Wallet

source§

fn mark_destinations_dirty(&mut self, destinations: &HashSet<TxDestination>)

| Marks all outputs in each one of the destinations | dirty, so their cache is reset and does | not return outdated information. |

source§

impl MarkDirty for Wallet

source§

fn mark_dirty(&mut self)

source§

impl MarkInputsDirty for Wallet

source§

fn mark_inputs_dirty(&mut self, tx: &TransactionRef)

| Mark a transaction’s inputs dirty, | thus forcing the outputs to be recomputed |

source§

impl MarkReplaced for Wallet

source§

fn mark_replaced(&mut self, original_hash: &u256, new_hash: &u256) -> bool

| Mark a transaction as replaced by another | transaction (e.g., BIP 125). |

source§

impl PostInitProcess for Wallet

source§

fn post_init_process(&mut self)

| Wallet post-init setup | | Gives the wallet a chance to register | repetitive tasks and complete post-init | tasks |

source§

impl ReacceptWalletTransactions for Wallet

source§

impl ReorderTransactions for Wallet

source§

impl RescanFromTime for Wallet

source§

fn rescan_from_time( &mut self, start_time: i64, reserver: &WalletRescanReserver, update: bool ) -> i64

source§

impl ResendWalletTransactions for Wallet

source§

impl ScanForWalletTransactions for Wallet

source§

fn scan_for_wallet_transactions( &mut self, start_block: &u256, start_height: i32, max_height: Option<i32>, reserver: &WalletRescanReserver, update: bool ) -> WalletScanResult

source§

impl ScanningDuration for Wallet

source§

impl ScanningProgress for Wallet

source§

impl SetAddressBook for Wallet

source§

fn set_address_book( &mut self, address: &TxDestination, str_name: &String, purpose: &String ) -> bool

| Add or update address. |
source§

impl SetAddressBookWithDB for Wallet

source§

fn set_address_book_withdb( &mut self, batch: &mut WalletBatch, address: &TxDestination, str_name: &str, str_purpose: &str ) -> bool

source§

impl SetAddressReceiveRequestWithBatch for Wallet

source§

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

| Save or remove receive request. |
source§

impl SetAddressUsed for Wallet

source§

fn set_address_used( &mut self, batch: &mut WalletBatch, dest: &TxDestination, used: bool ) -> bool

source§

impl SetBroadcastTransactions for Wallet

source§

fn set_broadcast_transactions(&mut self, broadcast: bool)

| Set whether this wallet broadcasts | transactions. |

source§

impl SetLastBlockProcessed for Wallet

source§

fn set_last_block_processed(&mut self, block_height: i32, block_hash: u256)

| Set last block processed height, currently | only use in unit test |

source§

impl SetMinVersion for Wallet

source§

fn set_min_version( &mut self, _0: WalletFeature, batch_in: Option<*mut WalletBatch> )

| signify that a particular wallet feature | is now used. |

source§

impl SetSpentKeyState for Wallet

source§

fn set_spent_key_state( &mut self, batch: &mut WalletBatch, hash: &u256, n: u32, used: bool, tx_destinations: &mut HashSet<TxDestination> )

source§

impl SetWalletFlag for Wallet

source§

fn set_wallet_flag(&mut self, flags: u64)

| set a single wallet flag |

source§

impl SetupDescriptorScriptPubKeyMans for Wallet

source§

fn setup_descriptor_script_pub_key_mans(&mut self)

| Create new DescriptorScriptPubKeyMans | and add them to the wallet |

source§

impl SetupLegacyScriptPubKeyMan for Wallet

source§

fn setup_legacy_script_pub_key_man(&mut self)

| Make a LegacyScriptPubKeyMan and set | it for all types, internal, and external. |

source§

impl SignMessage for Wallet

source§

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

| Sign a message with the given script |
source§

impl SignTransactionGivenInputCoinsAndSighash for Wallet

source§

fn sign_transaction_given_input_coins_and_sighash( &self, tx: &mut MutableTransaction, coins: &HashMap<OutPoint, Coin>, sighash: i32, input_errors: &mut HashMap<i32, BilingualStr> ) -> bool

| Sign the tx given the input coins and | sighash. |

source§

impl SubmitTxMemoryPoolAndRelay for Wallet

source§

fn submit_tx_memory_pool_and_relay( &self, wtx: &WalletTx, err_string: &mut String, relay: bool ) -> bool

| Pass this transaction to node for mempool | insertion and relay to peers if flag | set to true |

source§

impl SyncMetaData for Wallet

source§

impl SyncTransaction for Wallet

source§

fn sync_transaction( &mut self, tx: &TransactionRef, confirm: WalletTxConfirmation, update_tx: Option<bool>, rescanning_old_block: Option<bool> )

source§

impl TopUpKeyPool for Wallet

source§

fn top_up_key_pool(&mut self, kp_size: Option<u32>) -> bool

source§

impl TransactionAddedToMempool for Wallet

source§

fn transaction_added_to_mempool( &mut self, tx: &TransactionRef, mempool_sequence: u64 )

| Notifies listeners of a transaction | having been added to mempool. | | Called on a background thread. |
source§

impl TransactionCanBeAbandoned for Wallet

source§

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

| Return whether transaction can be abandoned |

source§

impl TransactionChangeType for Wallet

source§

fn transaction_change_type( &self, change_type: &Option<OutputType>, vec_send: &Vec<Recipient> ) -> OutputType

source§

impl TransactionRemovedFromMempool for Wallet

source§

fn transaction_removed_from_mempool( &mut self, tx: &TransactionRef, reason: MemPoolRemovalReason, mempool_sequence: u64 )

| Notifies listeners of a transaction | leaving mempool. | | This notification fires for transactions | that are removed from the mempool for | the following reasons: | | - EXPIRY (expired from mempool after | -mempoolexpiry hours) | | - SIZELIMIT (removed in size limiting | if the mempool exceeds -maxmempool | megabytes) | | - REORG (removed during a reorg) | | - CONFLICT (removed because it conflicts | with in-block transaction) | | - REPLACED (removed due to RBF replacement) | | This does not fire for transactions | that are removed from the mempool because | they have been included in a block. Any | client that is interested in transactions | removed from the mempool for inclusion | in a block can learn about those transactions | from the BlockConnected notification. | | Transactions that are removed from | the mempool because they conflict with | a transaction in the new block will have | | TransactionRemovedFromMempool events | fired before the BlockConnected | event is fired. If multiple blocks are | connected in one step, then the ordering | could be: | | - TransactionRemovedFromMempool(tx1 | from block A) | | - TransactionRemovedFromMempool(tx2 | from block A) | | - TransactionRemovedFromMempool(tx1 | from block B) | | - TransactionRemovedFromMempool(tx2 | from block B) | | - BlockConnected(A) | | - BlockConnected(B) | | Called on a background thread. |
source§

impl Unlock for Wallet

source§

fn unlock( &mut self, str_wallet_passphrase: &SecureString, accept_no_keys: Option<bool> ) -> bool

| Unlock wallet. |
source§

impl UnlockAllCoins for Wallet

source§

impl UnlockCoinWithBatch for Wallet

source§

impl UnsetBlankWalletFlag for Wallet

source§

fn unset_blank_wallet_flag(&mut self, batch: &mut WalletBatch)

| Unset the blank wallet flag and saves | it to disk |

source§

impl UnsetWalletFlag for Wallet

source§

fn unset_wallet_flag(&mut self, flag: u64)

| Unsets a single wallet flag |

source§

impl UnsetWalletFlagWithDB for Wallet

source§

fn unset_wallet_flag_withdb(&mut self, batch: &mut WalletBatch, flag: u64)

| Unsets a wallet flag and saves it to disk |

source§

impl UpdatedBlockTip for Wallet

source§

fn updated_block_tip( &mut self, pindex_new: Option<Arc<BlockIndex>>, pindex_fork: Option<Arc<BlockIndex>>, initial_download: bool )

| Notifies listeners when the block chain | tip advances. | | When multiple blocks are connected | at once, UpdatedBlockTip will be called | on the final tip but may not be called | on every intermediate tip. If the latter | behavior is desired, subscribe to BlockConnected() | instead. | | Called on a background thread. |
source§

impl UpgradeDescriptorCache for Wallet

source§

fn upgrade_descriptor_cache(&mut self)

| Upgrade DescriptorCaches |

source§

impl UpgradeKeyMetadata for Wallet

source§

fn upgrade_key_metadata(&mut self)

| Upgrade stored CKeyMetadata objects | to store key origin info as KeyOriginInfo |

source§

impl UpgradeWallet for Wallet

source§

fn upgrade_wallet(&mut self, version: i32, error: &mut BilingualStr) -> bool

| Upgrade the wallet |

source§

impl WalletFillPSBT for Wallet

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

| Fills out a PSBT with information from | the wallet. Fills in UTXOs if we have | them. Tries to sign if sign=true. Sets | complete if the PSBT is now complete | (i.e. has all required signatures or | signature-parts, and is ready to finalize.) | Sets error and returns false if something | goes wrong. | | ———– | @param[in] psbtx | | PartiallySignedTransaction to fill | in | ––––– | @param[out] complete | | indicates whether the PSBT is now complete | ––––– | @param[in] sighash_type | | the sighash type to use when signing | (if PSBT does not specify) | ––––– | @param[in] sign | | whether to sign or not | ––––– | @param[in] bip32derivs | | whether to fill in bip32 derivation | information if available return error |

source§

impl WalletGetNewDestination for Wallet

source§

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

| Get a new address. |
source§

impl WalletLogPrintf for Wallet

source§

fn wallet_log_printf<Params>(&self, fmt: String, parameters: Params)

| Prepends the wallet name in logging | output to ease debugging in multi-wallet | use cases |

source§

impl WalletSignTransaction for Wallet

source§

fn sign_transaction(&self, tx: &mut MutableTransaction) -> bool

| Fetch the inputs and sign with SIGHASH_ALL. |

source§

impl ZapSelectTx for Wallet

source§

fn zap_select_tx( &mut self, hash_in: &mut Vec<u256>, hash_out: &mut Vec<u256> ) -> DBErrors

source§

impl ChainNotifications for Wallet

source§

impl WalletStorage for Wallet

Auto Trait Implementations§

§

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> 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