Struct bitcoinwallet_library::Wallet
source · 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
impl Wallet
sourcepub fn new<'a>(
chain: &'a mut dyn ChainInterface,
name: &str,
database: Box<WalletDatabase>
) -> Self
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
impl AbandonTransaction for Wallet
source§fn abandon_transaction(&mut self, hash_tx: &u256) -> bool
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
impl AbortRescan for Wallet
fn abort_rescan(&mut self)
source§impl AddActiveScriptPubKeyMan for Wallet
impl AddActiveScriptPubKeyMan for Wallet
source§fn add_active_script_pub_key_man(
&mut self,
id: u256,
ty: OutputType,
internal: bool
)
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
impl AddToSpends for Wallet
fn add_to_spends(&mut self, wtxid: &u256, batch: Option<*mut WalletBatch>)
source§impl AddToSpendsWithOutpoint for Wallet
impl AddToSpendsWithOutpoint for Wallet
fn add_to_spends_with_outpoint( &mut self, outpoint: &OutPoint, wtxid: &u256, batch: Option<*mut WalletBatch> )
source§impl AddToWallet for Wallet
impl AddToWallet for Wallet
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
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
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
impl AddWalletDescriptor for Wallet
source§fn add_wallet_descriptor(
&mut self,
desc: &mut WalletDescriptor,
signing_provider: &FlatSigningProvider,
label: &String,
internal: bool
) -> *mut ScriptPubKeyMan
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
impl AddWalletFlags for Wallet
source§fn add_wallet_flags(&mut self, flags: u64) -> bool
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
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
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
impl BackupWallet for Wallet
fn backup_wallet(&self, str_dest: &String) -> bool
source§impl BlockConnected for Wallet
impl BlockConnected for Wallet
source§fn block_connected(&mut self, block: Arc<Block>, pindex: Arc<BlockIndex>)
fn block_connected(&mut self, block: Arc<Block>, pindex: Arc<BlockIndex>)
source§impl BlockDisconnected for Wallet
impl BlockDisconnected for Wallet
source§fn block_disconnected(&mut self, block: Arc<Block>, pindex: Arc<BlockIndex>)
fn block_disconnected(&mut self, block: Arc<Block>, pindex: Arc<BlockIndex>)
source§impl BlockUntilSyncedToCurrentChain for Wallet
impl BlockUntilSyncedToCurrentChain for Wallet
source§fn block_until_synced_to_current_chain(&self)
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
impl CanGetAddresses for Wallet
source§impl CanSupportFeature for Wallet
impl CanSupportFeature for Wallet
source§fn can_support_feature(&self, wf: WalletFeature) -> bool
fn can_support_feature(&self, wf: WalletFeature) -> bool
| check whether we support the named feature |
source§impl ChainStateFlushed for Wallet
impl ChainStateFlushed for Wallet
source§fn chain_state_flushed(&mut self, loc: &BlockLocator)
fn chain_state_flushed(&mut self, loc: &BlockLocator)
source§impl ChangeWalletPassphrase for Wallet
impl ChangeWalletPassphrase for Wallet
fn change_wallet_passphrase( &mut self, str_old_wallet_passphrase: &SecureString, str_new_wallet_passphrase: &SecureString ) -> bool
source§impl CheckIsLockedCoinWithHash for Wallet
impl CheckIsLockedCoinWithHash for Wallet
source§impl CommitTransaction for Wallet
impl CommitTransaction for Wallet
source§fn commit_transaction(
&mut self,
tx: TransactionRef,
map_value: MapValue,
order_form: Vec<(String, String)>
)
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
impl ComputeTimeSmart for Wallet
source§impl ConnectScriptPubKeyManNotifiers for Wallet
impl ConnectScriptPubKeyManNotifiers for Wallet
source§fn connect_script_pub_key_man_notifiers(&mut self)
fn connect_script_pub_key_man_notifiers(&mut self)
| Connect the signals from ScriptPubKeyMans | to the signals in CWallet |
source§impl Create for Wallet
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>
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
impl DeactivateScriptPubKeyMan for Wallet
source§fn deactivate_script_pub_key_man(
&mut self,
id: u256,
ty: OutputType,
internal: bool
)
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
impl DelAddressBook for Wallet
source§fn del_address_book(&mut self, address: &TxDestination) -> bool
fn del_address_book(&mut self, address: &TxDestination) -> bool
source§impl DisplayAddress for Wallet
impl DisplayAddress for Wallet
source§fn display_address(&mut self, dest: &TxDestination) -> bool
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 DummySignTx for Wallet
impl DummySignTx for Wallet
fn dummy_sign_tx( &self, tx_new: &mut MutableTransaction, txouts: &HashSet<TxOut>, coin_control: Option<*const CoinControl> ) -> bool
source§impl EncryptWallet for Wallet
impl EncryptWallet for Wallet
fn encrypt_wallet(&mut self, str_wallet_passphrase: &SecureString) -> bool
source§impl FindAddressBookEntry for Wallet
impl FindAddressBookEntry for Wallet
fn find_address_book_entry( &self, _0: &TxDestination, allow_change: Option<bool> ) -> *const AddressBookData
source§impl GetActiveScriptPubKeyMans for Wallet
impl GetActiveScriptPubKeyMans for Wallet
source§fn get_active_script_pub_key_mans(&self) -> HashSet<*mut ScriptPubKeyMan>
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
impl GetAddressReceiveRequests for Wallet
source§fn get_address_receive_requests(&self) -> Vec<String>
fn get_address_receive_requests(&self) -> Vec<String>
source§impl GetAllScriptPubKeyMans for Wallet
impl GetAllScriptPubKeyMans for Wallet
source§fn get_all_script_pub_key_mans(&self) -> HashSet<*mut ScriptPubKeyMan>
fn get_all_script_pub_key_mans(&self) -> HashSet<*mut ScriptPubKeyMan>
| Returns all unique ScriptPubKeyMans |
source§impl GetBroadcastTransactions for Wallet
impl GetBroadcastTransactions for Wallet
source§fn get_broadcast_transactions(&self) -> bool
fn get_broadcast_transactions(&self) -> bool
| Inquire whether this wallet broadcasts | transactions. |
source§impl GetConflicts for Wallet
impl GetConflicts for Wallet
source§fn get_conflicts(&self, txid: &u256) -> HashSet<u256>
fn get_conflicts(&self, txid: &u256) -> HashSet<u256>
| Get wallet transactions that conflict | with given transaction (spend same | outputs) |
source§impl GetDatabase for Wallet
impl GetDatabase for Wallet
fn get_database(&self) -> &mut WalletDatabase
source§impl GetDebitWithTxAndFilter for Wallet
impl GetDebitWithTxAndFilter for Wallet
fn get_debit_with_tx_and_filter( &self, tx: &Transaction, filter: &IsMineFilter ) -> Amount
source§impl GetDebitWithTxinAndFilter for Wallet
impl GetDebitWithTxinAndFilter for Wallet
source§fn get_debit_with_txin_and_filter(
&self,
txin: &TxIn,
filter: &IsMineFilter
) -> Amount
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
impl GetDescriptorScriptPubKeyMan for Wallet
source§fn get_descriptor_script_pub_key_man(
&self,
desc: &WalletDescriptor
) -> *mut DescriptorScriptPubKeyMan
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
impl GetDisplayName for Wallet
source§fn get_display_name(&self) -> String
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
impl GetEncryptionKey for Wallet
fn get_encryption_key(&self) -> &KeyingMaterial
source§impl GetKeyBirthTimes for Wallet
impl GetKeyBirthTimes for Wallet
fn get_key_birth_times(&self, map_key_birth: &mut HashMap<KeyID, i64>)
source§impl GetKeyPoolSize for Wallet
impl GetKeyPoolSize for Wallet
fn get_key_pool_size(&self) -> u32
source§impl GetLabelAddresses for Wallet
impl GetLabelAddresses for Wallet
fn get_label_addresses(&self, label: &String) -> HashSet<TxDestination>
source§impl GetLastBlockHash for Wallet
impl GetLastBlockHash for Wallet
fn get_last_block_hash(&self) -> u256
source§impl GetLastBlockHeight for Wallet
impl GetLastBlockHeight for Wallet
source§fn get_last_block_height(&self) -> i32
fn get_last_block_height(&self) -> i32
| Get last block processed height |
source§impl GetLegacyScriptPubKeyMan for Wallet
impl GetLegacyScriptPubKeyMan for Wallet
source§fn get_legacy_script_pub_key_man(&self) -> *mut LegacyScriptPubKeyMan
fn get_legacy_script_pub_key_man(&self) -> *mut LegacyScriptPubKeyMan
| Get the LegacyScriptPubKeyMan which | is used for all types, internal, and | external. |
source§impl GetNewChangeDestination for Wallet
impl GetNewChangeDestination for Wallet
fn get_new_change_destination( &mut self, ty: OutputType, dest: &mut TxDestination, error: &mut BilingualStr ) -> bool
source§impl GetOldestKeyPoolTime for Wallet
impl GetOldestKeyPoolTime for Wallet
fn get_oldest_key_pool_time(&self) -> i64
source§impl GetOrCreateLegacyScriptPubKeyMan for Wallet
impl GetOrCreateLegacyScriptPubKeyMan for Wallet
fn get_or_create_legacy_script_pub_key_man( &mut self ) -> *mut LegacyScriptPubKeyMan
source§impl GetScriptPubKeyMan for Wallet
impl GetScriptPubKeyMan for Wallet
source§fn get_script_pub_key_man(
&self,
ty: &OutputType,
internal: bool
) -> *mut ScriptPubKeyMan
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
impl GetScriptPubKeyManWithId for Wallet
source§fn get_script_pub_key_man_with_id(&self, id: &u256) -> *mut ScriptPubKeyMan
fn get_script_pub_key_man_with_id(&self, id: &u256) -> *mut ScriptPubKeyMan
| Get the ScriptPubKeyMan by id |
source§impl GetScriptPubKeyManWithScript for Wallet
impl GetScriptPubKeyManWithScript for Wallet
source§fn get_script_pub_key_man_with_script(
&self,
script: &Script
) -> *mut ScriptPubKeyMan
fn get_script_pub_key_man_with_script( &self, script: &Script ) -> *mut ScriptPubKeyMan
| Get the ScriptPubKeyMan for a script |
source§impl GetScriptPubKeyMans for Wallet
impl GetScriptPubKeyMans for Wallet
source§fn get_script_pub_key_mans(
&self,
script: &Script,
sigdata: &mut SignatureData
) -> HashSet<*mut ScriptPubKeyMan>
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
impl GetSolvingProvider for Wallet
source§fn get_solving_provider(&self, script: &Script) -> Box<SigningProvider>
fn get_solving_provider(&self, script: &Script) -> Box<SigningProvider>
| Get the SigningProvider for a script |
source§impl GetSolvingProviderWithSigdata for Wallet
impl GetSolvingProviderWithSigdata for Wallet
fn get_solving_provider_with_sigdata( &self, script: &Script, sigdata: &mut SignatureData ) -> Box<SigningProvider>
source§impl GetTxBlocksToMaturity for Wallet
impl GetTxBlocksToMaturity for Wallet
source§fn get_tx_blocks_to_maturity(&self, wtx: &WalletTx) -> i32
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
impl GetTxConflicts for Wallet
source§fn get_tx_conflicts(&self, wtx: &WalletTx) -> HashSet<u256>
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
impl GetTxDepthInMainChain for Wallet
source§fn get_tx_depth_in_main_chain(&self, wtx: &WalletTx) -> i32
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
impl GetVersion for Wallet
source§fn get_version(&self) -> i32
fn get_version(&self) -> i32
| get the current wallet format (the oldest | client version guaranteed to understand | this wallet) |
source§impl GetWalletTx for Wallet
impl GetWalletTx for Wallet
source§fn get_wallet_tx(&self, hash: &u256) -> WalletTx
fn get_wallet_tx(&self, hash: &u256) -> WalletTx
source§impl HasEncryptionKeys for Wallet
impl HasEncryptionKeys for Wallet
fn has_encryption_keys(&self) -> bool
source§impl HasWalletSpend for Wallet
impl HasWalletSpend for Wallet
source§fn has_wallet_spend(&self, txid: &u256) -> bool
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
impl HaveChain for Wallet
source§fn have_chain(&self) -> bool
fn have_chain(&self) -> bool
| Interface to assert chain access |
source§impl ImportPrivKeys for Wallet
impl ImportPrivKeys for Wallet
source§impl ImportPubKeys for Wallet
impl ImportPubKeys for Wallet
source§impl ImportScriptPubKeys for Wallet
impl ImportScriptPubKeys for Wallet
source§impl ImportScripts for Wallet
impl ImportScripts for Wallet
source§impl IncOrderPosNext for Wallet
impl IncOrderPosNext for Wallet
source§fn inc_order_pos_next(&mut self, batch: Option<*mut WalletBatch>) -> i64
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
impl IsAbortingRescan for Wallet
fn is_aborting_rescan(&self) -> bool
source§impl IsAddressUsed for Wallet
impl IsAddressUsed for Wallet
fn is_address_used(&self, dest: &TxDestination) -> bool
source§impl IsCrypted for Wallet
impl IsCrypted for Wallet
source§fn is_crypted(&self) -> bool
fn is_crypted(&self) -> bool
source§impl IsFromMe for Wallet
impl IsFromMe for Wallet
source§fn is_from_me(&self, tx: &Transaction) -> bool
fn is_from_me(&self, tx: &Transaction) -> bool
| should probably be renamed to IsRelevantToMe |
source§impl IsHDEnabled for Wallet
impl IsHDEnabled for Wallet
source§fn is_hd_enabled(&self) -> bool
fn is_hd_enabled(&self) -> bool
| Returns true if HD is enabled |
source§impl IsMineWithScript for Wallet
impl IsMineWithScript for Wallet
fn is_mine_with_script(&self, script: &Script) -> IsMineType
source§impl IsMineWithTx for Wallet
impl IsMineWithTx for Wallet
fn is_mine_with_tx(&self, tx: &Transaction) -> bool
source§impl IsMineWithTxDest for Wallet
impl IsMineWithTxDest for Wallet
fn is_mine_with_tx_dest(&self, dest: &TxDestination) -> IsMineType
source§impl IsMineWithTxout for Wallet
impl IsMineWithTxout for Wallet
fn is_mine_with_txout(&self, txout: &TxOut) -> IsMineType
source§impl IsScanning for Wallet
impl IsScanning for Wallet
fn is_scanning(&self) -> bool
source§impl IsSpentKey for Wallet
impl IsSpentKey for Wallet
source§impl IsTxImmatureCoinBase for Wallet
impl IsTxImmatureCoinBase for Wallet
fn is_tx_immature_coin_base(&self, wtx: &WalletTx) -> bool
source§impl IsTxInMainChain for Wallet
impl IsTxInMainChain for Wallet
fn is_tx_in_main_chain(&self, wtx: &WalletTx) -> bool
source§impl IsWalletFlagSet for Wallet
impl IsWalletFlagSet for Wallet
source§fn is_wallet_flag_set(&self, flag: u64) -> bool
fn is_wallet_flag_set(&self, flag: u64) -> bool
| check if a certain wallet flag is set |
source§impl KeypoolCountExternalKeys for Wallet
impl KeypoolCountExternalKeys for Wallet
fn keypool_count_external_keys(&self) -> usize
source§impl ListLockedCoins for Wallet
impl ListLockedCoins for Wallet
fn list_locked_coins(&self, outpts: &mut Vec<OutPoint>)
source§impl LoadActiveScriptPubKeyMan for Wallet
impl LoadActiveScriptPubKeyMan for Wallet
source§fn load_active_script_pub_key_man(
&mut self,
id: u256,
ty: OutputType,
internal: bool
)
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
impl LoadDescriptorScriptPubKeyMan for Wallet
source§fn load_descriptor_script_pub_key_man(
&mut self,
id: u256,
desc: &mut WalletDescriptor
)
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
impl LoadDestData for Wallet
source§fn load_dest_data(&mut self, dest: &TxDestination, key: &String, value: &String)
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
impl LoadMinVersion for Wallet
fn load_min_version(&mut self, n_version: i32) -> bool
source§impl LoadToWallet for Wallet
impl LoadToWallet for Wallet
fn load_to_wallet( &mut self, hash: &u256, fill_wtx: &WalletUpdateWalletTxFn ) -> bool
source§impl LoadWallet for Wallet
impl LoadWallet for Wallet
fn load_wallet(&mut self) -> DBErrors
source§impl LoadWalletFlags for Wallet
impl LoadWalletFlags for Wallet
source§fn load_wallet_flags(&mut self, flags: u64) -> bool
fn load_wallet_flags(&mut self, flags: u64) -> bool
| Loads the flags into the wallet. (used | by LoadWallet) |
source§impl MarkConflicted for Wallet
impl MarkConflicted for Wallet
source§impl MarkDestinationsDirty for Wallet
impl MarkDestinationsDirty for Wallet
source§fn mark_destinations_dirty(&mut self, destinations: &HashSet<TxDestination>)
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 MarkInputsDirty for Wallet
impl MarkInputsDirty for Wallet
source§fn mark_inputs_dirty(&mut self, tx: &TransactionRef)
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
impl MarkReplaced for Wallet
source§impl PostInitProcess for Wallet
impl PostInitProcess for Wallet
source§fn post_init_process(&mut self)
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
impl ReacceptWalletTransactions for Wallet
fn reaccept_wallet_transactions(&mut self)
source§impl ReorderTransactions for Wallet
impl ReorderTransactions for Wallet
fn reorder_transactions(&mut self) -> DBErrors
source§impl RescanFromTime for Wallet
impl RescanFromTime for Wallet
fn rescan_from_time( &mut self, start_time: i64, reserver: &WalletRescanReserver, update: bool ) -> i64
source§impl ResendWalletTransactions for Wallet
impl ResendWalletTransactions for Wallet
fn resend_wallet_transactions(&mut self)
source§impl ScanForWalletTransactions for Wallet
impl ScanForWalletTransactions for Wallet
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
impl ScanningDuration for Wallet
fn scanning_duration(&self) -> i64
source§impl ScanningProgress for Wallet
impl ScanningProgress for Wallet
fn scanning_progress(&self) -> f64
source§impl SetAddressBook for Wallet
impl SetAddressBook for Wallet
source§fn set_address_book(
&mut self,
address: &TxDestination,
str_name: &String,
purpose: &String
) -> bool
fn set_address_book( &mut self, address: &TxDestination, str_name: &String, purpose: &String ) -> bool
source§impl SetAddressBookWithDB for Wallet
impl SetAddressBookWithDB for Wallet
fn set_address_book_withdb( &mut self, batch: &mut WalletBatch, address: &TxDestination, str_name: &str, str_purpose: &str ) -> bool
source§impl SetAddressReceiveRequestWithBatch for Wallet
impl SetAddressReceiveRequestWithBatch for Wallet
source§fn set_address_receive_request_with_batch(
&mut self,
batch: &mut WalletBatch,
dest: &TxDestination,
id: &String,
value: &String
) -> bool
fn set_address_receive_request_with_batch( &mut self, batch: &mut WalletBatch, dest: &TxDestination, id: &String, value: &String ) -> bool
source§impl SetAddressUsed for Wallet
impl SetAddressUsed for Wallet
fn set_address_used( &mut self, batch: &mut WalletBatch, dest: &TxDestination, used: bool ) -> bool
source§impl SetBroadcastTransactions for Wallet
impl SetBroadcastTransactions for Wallet
source§fn set_broadcast_transactions(&mut self, broadcast: bool)
fn set_broadcast_transactions(&mut self, broadcast: bool)
| Set whether this wallet broadcasts | transactions. |
source§impl SetLastBlockProcessed for Wallet
impl SetLastBlockProcessed for Wallet
source§fn set_last_block_processed(&mut self, block_height: i32, block_hash: u256)
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
impl SetMinVersion for Wallet
source§fn set_min_version(
&mut self,
_0: WalletFeature,
batch_in: Option<*mut WalletBatch>
)
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
impl SetSpentKeyState for Wallet
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
impl SetWalletFlag for Wallet
source§fn set_wallet_flag(&mut self, flags: u64)
fn set_wallet_flag(&mut self, flags: u64)
| set a single wallet flag |
source§impl SetupDescriptorScriptPubKeyMans for Wallet
impl SetupDescriptorScriptPubKeyMans for Wallet
source§fn setup_descriptor_script_pub_key_mans(&mut self)
fn setup_descriptor_script_pub_key_mans(&mut self)
| Create new DescriptorScriptPubKeyMans | and add them to the wallet |
source§impl SetupLegacyScriptPubKeyMan for Wallet
impl SetupLegacyScriptPubKeyMan for Wallet
source§fn setup_legacy_script_pub_key_man(&mut self)
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
impl SignMessage for Wallet
source§fn sign_message(
&self,
message: &String,
pkhash: &PKHash,
str_sig: &mut String
) -> SigningResult
fn sign_message( &self, message: &String, pkhash: &PKHash, str_sig: &mut String ) -> SigningResult
source§impl SignTransactionGivenInputCoinsAndSighash for Wallet
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
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
impl SubmitTxMemoryPoolAndRelay for Wallet
source§impl SyncMetaData for Wallet
impl SyncMetaData for Wallet
fn sync_meta_data( &mut self, _0: (WalletTxSpendsIterator, WalletTxSpendsIterator) )
source§impl SyncTransaction for Wallet
impl SyncTransaction for Wallet
fn sync_transaction( &mut self, tx: &TransactionRef, confirm: WalletTxConfirmation, update_tx: Option<bool>, rescanning_old_block: Option<bool> )
source§impl TopUpKeyPool for Wallet
impl TopUpKeyPool for Wallet
source§impl TransactionAddedToMempool for Wallet
impl TransactionAddedToMempool for Wallet
source§fn transaction_added_to_mempool(
&mut self,
tx: &TransactionRef,
mempool_sequence: u64
)
fn transaction_added_to_mempool( &mut self, tx: &TransactionRef, mempool_sequence: u64 )
source§impl TransactionCanBeAbandoned for Wallet
impl TransactionCanBeAbandoned for Wallet
source§fn transaction_can_be_abandoned(&self, hash_tx: &u256) -> bool
fn transaction_can_be_abandoned(&self, hash_tx: &u256) -> bool
| Return whether transaction can be abandoned |
source§impl TransactionChangeType for Wallet
impl TransactionChangeType for Wallet
fn transaction_change_type( &self, change_type: &Option<OutputType>, vec_send: &Vec<Recipient> ) -> OutputType
source§impl TransactionRemovedFromMempool for Wallet
impl TransactionRemovedFromMempool for Wallet
source§fn transaction_removed_from_mempool(
&mut self,
tx: &TransactionRef,
reason: MemPoolRemovalReason,
mempool_sequence: u64
)
fn transaction_removed_from_mempool( &mut self, tx: &TransactionRef, reason: MemPoolRemovalReason, mempool_sequence: u64 )
source§impl UnlockAllCoins for Wallet
impl UnlockAllCoins for Wallet
fn unlock_all_coins(&mut self) -> bool
source§impl UnlockCoinWithBatch for Wallet
impl UnlockCoinWithBatch for Wallet
fn unlock_coin_with_batch( &mut self, output: &OutPoint, batch: Option<*mut WalletBatch> ) -> bool
source§impl UnsetBlankWalletFlag for Wallet
impl UnsetBlankWalletFlag for Wallet
source§fn unset_blank_wallet_flag(&mut self, batch: &mut WalletBatch)
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
impl UnsetWalletFlag for Wallet
source§fn unset_wallet_flag(&mut self, flag: u64)
fn unset_wallet_flag(&mut self, flag: u64)
| Unsets a single wallet flag |
source§impl UnsetWalletFlagWithDB for Wallet
impl UnsetWalletFlagWithDB for Wallet
source§fn unset_wallet_flag_withdb(&mut self, batch: &mut WalletBatch, flag: u64)
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
impl UpdatedBlockTip for Wallet
source§fn updated_block_tip(
&mut self,
pindex_new: Option<Arc<BlockIndex>>,
pindex_fork: Option<Arc<BlockIndex>>,
initial_download: bool
)
fn updated_block_tip( &mut self, pindex_new: Option<Arc<BlockIndex>>, pindex_fork: Option<Arc<BlockIndex>>, initial_download: bool )
source§impl UpgradeDescriptorCache for Wallet
impl UpgradeDescriptorCache for Wallet
source§fn upgrade_descriptor_cache(&mut self)
fn upgrade_descriptor_cache(&mut self)
| Upgrade DescriptorCaches |
source§impl UpgradeKeyMetadata for Wallet
impl UpgradeKeyMetadata for Wallet
source§fn upgrade_key_metadata(&mut self)
fn upgrade_key_metadata(&mut self)
| Upgrade stored CKeyMetadata objects | to store key origin info as KeyOriginInfo |
source§impl UpgradeWallet for Wallet
impl UpgradeWallet for Wallet
source§fn upgrade_wallet(&mut self, version: i32, error: &mut BilingualStr) -> bool
fn upgrade_wallet(&mut self, version: i32, error: &mut BilingualStr) -> bool
| Upgrade the wallet |
source§impl WalletFillPSBT for Wallet
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
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
impl WalletGetNewDestination for Wallet
source§fn get_new_destination(
&mut self,
ty: OutputType,
label: String,
dest: &mut TxDestination,
error: &mut BilingualStr
) -> bool
fn get_new_destination( &mut self, ty: OutputType, label: String, dest: &mut TxDestination, error: &mut BilingualStr ) -> bool
source§impl WalletLogPrintf for Wallet
impl WalletLogPrintf for Wallet
source§fn wallet_log_printf<Params>(&self, fmt: String, parameters: Params)
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
impl WalletSignTransaction for Wallet
source§fn sign_transaction(&self, tx: &mut MutableTransaction) -> bool
fn sign_transaction(&self, tx: &mut MutableTransaction) -> bool
| Fetch the inputs and sign with SIGHASH_ALL. |