Bitcoin ABC 0.30.5
P2P Digital Currency
|
Cache for single descriptor's derived extended pubkeys. More...
#include <descriptor.h>
Public Member Functions | |
void | CacheParentExtPubKey (uint32_t key_exp_pos, const CExtPubKey &xpub) |
Cache a parent xpub. More... | |
bool | GetCachedParentExtPubKey (uint32_t key_exp_pos, CExtPubKey &xpub) const |
Retrieve a cached parent xpub. More... | |
void | CacheDerivedExtPubKey (uint32_t key_exp_pos, uint32_t der_index, const CExtPubKey &xpub) |
Cache an xpub derived at an index. More... | |
bool | GetCachedDerivedExtPubKey (uint32_t key_exp_pos, uint32_t der_index, CExtPubKey &xpub) const |
Retrieve a cached xpub derived at an index. More... | |
const ExtPubKeyMap | GetCachedParentExtPubKeys () const |
Retrieve all cached parent xpubs. More... | |
const std::unordered_map< uint32_t, ExtPubKeyMap > | GetCachedDerivedExtPubKeys () const |
Retrieve all cached derived xpubs. More... | |
Private Attributes | |
std::unordered_map< uint32_t, ExtPubKeyMap > | m_derived_xpubs |
Map key expression index -> map of (key derivation index -> xpub) More... | |
ExtPubKeyMap | m_parent_xpubs |
Map key expression index -> parent xpub. More... | |
Cache for single descriptor's derived extended pubkeys.
Definition at line 19 of file descriptor.h.
void DescriptorCache::CacheDerivedExtPubKey | ( | uint32_t | key_exp_pos, |
uint32_t | der_index, | ||
const CExtPubKey & | xpub | ||
) |
Cache an xpub derived at an index.
[in] | key_exp_pos | Position of the key expression within the descriptor |
[in] | der_index | Derivation index of the xpub |
[in] | xpub | The CExtPubKey to cache |
Definition at line 1311 of file descriptor.cpp.
void DescriptorCache::CacheParentExtPubKey | ( | uint32_t | key_exp_pos, |
const CExtPubKey & | xpub | ||
) |
Cache a parent xpub.
[in] | key_exp_pos | Position of the key expression within the descriptor |
[in] | xpub | The CExtPubKey to cache |
Definition at line 1306 of file descriptor.cpp.
bool DescriptorCache::GetCachedDerivedExtPubKey | ( | uint32_t | key_exp_pos, |
uint32_t | der_index, | ||
CExtPubKey & | xpub | ||
) | const |
Retrieve a cached xpub derived at an index.
[in] | key_exp_pos | Position of the key expression within the descriptor |
[in] | der_index | Derivation index of the xpub |
[in] | xpub | The CExtPubKey to get from cache |
Definition at line 1328 of file descriptor.cpp.
const std::unordered_map< uint32_t, ExtPubKeyMap > DescriptorCache::GetCachedDerivedExtPubKeys | ( | ) | const |
Retrieve all cached derived xpubs.
Definition at line 1348 of file descriptor.cpp.
bool DescriptorCache::GetCachedParentExtPubKey | ( | uint32_t | key_exp_pos, |
CExtPubKey & | xpub | ||
) | const |
Retrieve a cached parent xpub.
[in] | key_exp_pos | Position of the key expression within the descriptor |
[in] | xpub | The CExtPubKey to get from cache |
Definition at line 1318 of file descriptor.cpp.
const ExtPubKeyMap DescriptorCache::GetCachedParentExtPubKeys | ( | ) | const |
Retrieve all cached parent xpubs.
Definition at line 1343 of file descriptor.cpp.
|
private |
Map key expression index -> map of (key derivation index -> xpub)
Definition at line 22 of file descriptor.h.
|
private |
Map key expression index -> parent xpub.
Definition at line 24 of file descriptor.h.