Struct bitcoin_signingprovider::DescriptorCache
source · pub struct DescriptorCache { /* private fields */ }
Expand description
| Cache for single descriptor’s derived | extended pubkeys |
Implementations§
source§impl DescriptorCache
impl DescriptorCache
sourcepub fn cache_parent_ext_pub_key(&mut self, key_exp_pos: u32, xpub: &ExtPubKey)
pub fn cache_parent_ext_pub_key(&mut self, key_exp_pos: u32, xpub: &ExtPubKey)
| Cache a parent xpub | | ———– | @param[in] key_exp_pos | | Position of the key expression within | the descriptor | ––––– | @param[in] xpub | | The CExtPubKey to cache |
sourcepub fn cache_derived_ext_pub_key(
&mut self,
key_exp_pos: u32,
der_index: u32,
xpub: &ExtPubKey
)
pub fn cache_derived_ext_pub_key( &mut self, key_exp_pos: u32, der_index: u32, xpub: &ExtPubKey )
| Cache an xpub derived at an index | | ———– | @param[in] key_exp_pos | | Position of the key expression within | the descriptor | ––––– | @param[in] der_index | | Derivation index of the xpub | ––––– | @param[in] xpub | | The CExtPubKey to cache |
sourcepub fn cache_last_hardened_ext_pub_key(
&mut self,
key_exp_pos: u32,
xpub: &ExtPubKey
)
pub fn cache_last_hardened_ext_pub_key( &mut self, key_exp_pos: u32, xpub: &ExtPubKey )
| Cache a last hardened xpub | | ———– | @param[in] key_exp_pos | | Position of the key expression within | the descriptor | ––––– | @param[in] xpub | | The CExtPubKey to cache |
sourcepub fn get_cached_parent_ext_pub_key(
&self,
key_exp_pos: u32,
xpub: &mut ExtPubKey
) -> bool
pub fn get_cached_parent_ext_pub_key( &self, key_exp_pos: u32, xpub: &mut ExtPubKey ) -> bool
| Retrieve a cached parent xpub | | ———– | @param[in] key_exp_pos | | Position of the key expression within | the descriptor | ––––– | @param[in] xpub | | The CExtPubKey to get from cache |
sourcepub fn get_cached_derived_ext_pub_key(
&self,
key_exp_pos: u32,
der_index: u32,
xpub: &mut ExtPubKey
) -> bool
pub fn get_cached_derived_ext_pub_key( &self, key_exp_pos: u32, der_index: u32, xpub: &mut ExtPubKey ) -> bool
| Retrieve a cached xpub derived at an | index | | ———– | @param[in] key_exp_pos | | Position of the key expression within | the descriptor | ––––– | @param[in] der_index | | Derivation index of the xpub | ––––– | @param[in] xpub | | The CExtPubKey to get from cache |
sourcepub fn get_cached_last_hardened_ext_pub_key(
&self,
key_exp_pos: u32,
xpub: &mut ExtPubKey
) -> bool
pub fn get_cached_last_hardened_ext_pub_key( &self, key_exp_pos: u32, xpub: &mut ExtPubKey ) -> bool
| Retrieve a cached last hardened xpub | | ———– | @param[in] key_exp_pos | | Position of the key expression within | the descriptor | ––––– | @param[in] xpub | | The CExtPubKey to get from cache |
sourcepub fn merge_and_diff(&mut self, other: &DescriptorCache) -> DescriptorCache
pub fn merge_and_diff(&mut self, other: &DescriptorCache) -> DescriptorCache
| Combine another DescriptorCache into | this one. | | Returns a cache containing the items | from the other cache unknown to current | cache |
sourcepub fn get_cached_parent_ext_pub_keys(&self) -> ExtPubKeyMap
pub fn get_cached_parent_ext_pub_keys(&self) -> ExtPubKeyMap
| Retrieve all cached parent xpubs |
sourcepub fn get_cached_derived_ext_pub_keys(&self) -> HashMap<u32, ExtPubKeyMap>
pub fn get_cached_derived_ext_pub_keys(&self) -> HashMap<u32, ExtPubKeyMap>
| Retrieve all cached derived xpubs |
sourcepub fn get_cached_last_hardened_ext_pub_keys(&self) -> ExtPubKeyMap
pub fn get_cached_last_hardened_ext_pub_keys(&self) -> ExtPubKeyMap
| Retrieve all cached last hardened xpubs |