diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-05-04 18:07:25 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-10-09 09:04:13 -0400 |
commit | 9be1437c49f986e8ed964d5f863b4bbcec340751 (patch) | |
tree | 4ce4749a32bf5e3e0f624126bf358b08a80df40f /src/script/descriptor.h | |
parent | 89a8299a14af68c1f96ca1650cbfd4fc2952e77b (diff) |
descriptors: Add ToNormalizedString and tests
Diffstat (limited to 'src/script/descriptor.h')
-rw-r--r-- | src/script/descriptor.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/descriptor.h b/src/script/descriptor.h index 17b43e7c81..46d51fa587 100644 --- a/src/script/descriptor.h +++ b/src/script/descriptor.h @@ -93,6 +93,9 @@ struct Descriptor { /** Convert the descriptor to a private string. This fails if the provided provider does not have the relevant private keys. */ virtual bool ToPrivateString(const SigningProvider& provider, std::string& out) const = 0; + /** Convert the descriptor to a normalized string. Normalized descriptors have the xpub at the last hardened step. This fails if the provided provider does not have the private keys to derive that xpub. */ + virtual bool ToNormalizedString(const SigningProvider& provider, std::string& out, bool priv) const = 0; + /** Expand a descriptor at a specified position. * * @param[in] pos The position at which to expand the descriptor. If IsRange() is false, this is ignored. |