5 #ifndef BITCOIN_SCRIPT_DESCRIPTOR_H 6 #define BITCOIN_SCRIPT_DESCRIPTOR_H 81 virtual bool IsRange()
const = 0;
88 virtual std::string
ToString()
const = 0;
91 virtual bool IsSingleType()
const = 0;
94 virtual bool ToPrivateString(
const SigningProvider& provider, std::string& out)
const = 0;
135 std::unique_ptr<Descriptor>
Parse(
const std::string& descriptor,
FlatSigningProvider& out, std::string&
error,
bool require_checksum =
false);
161 #endif // BITCOIN_SCRIPT_DESCRIPTOR_H const std::unordered_map< uint32_t, ExtPubKeyMap > GetCachedDerivedExtPubKeys() const
Retrieve all cached derived xpubs.
std::unique_ptr< Descriptor > Parse(const std::string &descriptor, FlatSigningProvider &out, std::string &error, bool require_checksum=false)
Parse a descriptor string.
ExtPubKeyMap m_parent_xpubs
Map key expression index -> parent xpub.
bool GetCachedParentExtPubKey(uint32_t key_exp_pos, CExtPubKey &xpub) const
Retrieve a cached parent xpub.
std::string ToString(const T &t)
Locale-independent version of std::to_string.
bool IsSolvable(const SigningProvider &provider, const CScript &script)
An interface to be implemented by keystores that support signing.
std::string GetDescriptorChecksum(const std::string &descriptor)
Get the checksum for a descriptor.
std::unordered_map< uint32_t, CExtPubKey > ExtPubKeyMap
Cache for single descriptor's derived extended pubkeys.
Serialized script, used inside transaction inputs and outputs.
void CacheParentExtPubKey(uint32_t key_exp_pos, const CExtPubKey &xpub)
Cache a parent xpub.
std::unique_ptr< Descriptor > InferDescriptor(const CScript &script, const SigningProvider &provider)
Find a descriptor for the specified script, using information from provider where possible...
const ExtPubKeyMap GetCachedParentExtPubKeys() const
Retrieve all cached parent xpubs.
bool error(const char *fmt, const Args &... args)
void CacheDerivedExtPubKey(uint32_t key_exp_pos, uint32_t der_index, const CExtPubKey &xpub)
Cache an xpub derived at an index.
std::optional< T > Optional
Substitute for C++17 std::optional DEPRECATED use std::optional in new code.
std::unordered_map< uint32_t, ExtPubKeyMap > m_derived_xpubs
Map key expression index -> map of (key derivation index -> xpub)
Interface for parsed descriptor objects.
bool GetCachedDerivedExtPubKey(uint32_t key_exp_pos, uint32_t der_index, CExtPubKey &xpub) const
Retrieve a cached xpub derived at an index.