diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-01-30 19:03:54 -0500 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-02-11 13:23:51 -0500 |
commit | 7e80f646b24a2abf3c031a649bcc706a695f80da (patch) | |
tree | f3723d0228cc629fd319f5ed8386194074484c90 /src/script/descriptor.h | |
parent | 3b69310beb172b2b56fbfc38c45898a1b627ac54 (diff) | |
download | bitcoin-7e80f646b24a2abf3c031a649bcc706a695f80da.tar.xz |
Get the OutputType for a descriptor
Diffstat (limited to 'src/script/descriptor.h')
-rw-r--r-- | src/script/descriptor.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/descriptor.h b/src/script/descriptor.h index a5a41d78dd..58b920c681 100644 --- a/src/script/descriptor.h +++ b/src/script/descriptor.h @@ -5,6 +5,8 @@ #ifndef BITCOIN_SCRIPT_DESCRIPTOR_H #define BITCOIN_SCRIPT_DESCRIPTOR_H +#include <optional.h> +#include <outputtype.h> #include <script/script.h> #include <script/sign.h> #include <script/signingprovider.h> @@ -71,6 +73,9 @@ struct Descriptor { * @param[out] out Any private keys available for the specified `pos`. */ virtual void ExpandPrivate(int pos, const SigningProvider& provider, FlatSigningProvider& out) const = 0; + + /** @return The OutputType of the scriptPubKey(s) produced by this descriptor. Or nullopt if indeterminate (multiple or none) */ + virtual Optional<OutputType> GetOutputType() const = 0; }; /** Parse a `descriptor` string. Included private keys are put in `out`. |