pub struct DescriptorScriptPubKeyMan { /* private fields */ }
Expand description
Implementations§
source§impl DescriptorScriptPubKeyMan
impl DescriptorScriptPubKeyMan
pub fn new_with_descriptor( storage: &mut dyn WalletStorage, descriptor: &mut WalletDescriptor ) -> Self
pub fn new<'a>(storage: &'a mut dyn WalletStorage) -> Self
sourcepub fn setup_descriptor(&mut self, desc: Box<dyn Descriptor>) -> bool
pub fn setup_descriptor(&mut self, desc: Box<dyn Descriptor>) -> bool
| Provide a descriptor at setup time | | Returns false if already setup or setup | fails, true if setup is successful |
pub fn is_mine(&self, script: &Script) -> IsMineType
pub fn check_decryption_key( &mut self, master_key: &KeyingMaterial, accept_no_keys: Option<bool> ) -> bool
pub fn encrypt( &mut self, master_key: &KeyingMaterial, batch: *mut WalletBatch ) -> bool
pub fn get_reserved_destination( &mut self, ty: OutputType, internal: bool, address: &mut TxDestination, index: &mut i64, keypool: &mut KeyPool, error: &mut BilingualStr ) -> bool
pub fn return_destination( &mut self, index: i64, internal: bool, addr: &TxDestination )
pub fn get_keys(&self) -> HashMap<KeyID, Key>
sourcepub fn top_up(&mut self, size: Option<u32>) -> bool
pub fn top_up(&mut self, size: Option<u32>) -> bool
| Tops up the descriptor cache and | m_map_script_pub_keys. The cache is stored | in the wallet file and is used to expand | the descriptor in | GetNewDestination. DescriptorScriptPubKeyMan | relies more on ephemeral data than | LegacyScriptPubKeyMan. For wallets using | unhardened derivation (with or without | private keys), the “keypool” is a single | xpub.
pub fn mark_unused_addresses(&mut self, script: &Script)
pub fn add_descriptor_key(&mut self, key: &Key, pubkey: &PubKey)
pub fn add_descriptor_key_withdb( &mut self, batch: &mut WalletBatch, key: &Key, pubkey: &PubKey ) -> bool
sourcepub fn setup_descriptor_generation(
&mut self,
master_key: &ExtKey,
addr_type: OutputType,
internal: bool
) -> bool
pub fn setup_descriptor_generation( &mut self, master_key: &ExtKey, addr_type: OutputType, internal: bool ) -> bool
| Setup descriptors based on the given | Extkey |
pub fn is_hd_enabled(&self) -> bool
pub fn can_get_addresses(&self, internal: Option<bool>) -> bool
pub fn have_private_keys(&self) -> bool
pub fn get_oldest_key_pool_time(&self) -> i64
pub fn get_key_pool_size(&self) -> u32
pub fn get_time_first_key(&self) -> i64
sourcepub fn get_signing_provider_with_script(
&self,
script: &Script,
include_private: Option<bool>
) -> Box<FlatSigningProvider>
pub fn get_signing_provider_with_script( &self, script: &Script, include_private: Option<bool> ) -> Box<FlatSigningProvider>
| Fetch the SigningProvider for the given | script and optionally include private | keys |
sourcepub fn get_signing_provider_with_pubkey(
&self,
pubkey: &PubKey
) -> Box<FlatSigningProvider>
pub fn get_signing_provider_with_pubkey( &self, pubkey: &PubKey ) -> Box<FlatSigningProvider>
| Fetch the SigningProvider for the given | pubkey and always include private keys. | This should only be called by signing | code. |
sourcepub fn get_signing_provider_with_index(
&self,
index: i32,
include_private: Option<bool>
) -> Box<FlatSigningProvider>
pub fn get_signing_provider_with_index( &self, index: i32, include_private: Option<bool> ) -> Box<FlatSigningProvider>
| Fetch the SigningProvider for a given index | and optionally include private keys. Called | by the above functions. |