diff options
Diffstat (limited to 'src/script/descriptor.cpp')
-rw-r--r-- | src/script/descriptor.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp index 95b949e9c2..a39cf635aa 100644 --- a/src/script/descriptor.cpp +++ b/src/script/descriptor.cpp @@ -938,6 +938,14 @@ std::unique_ptr<Descriptor> Parse(const std::string& descriptor, FlatSigningProv return nullptr; } +std::string GetDescriptorChecksum(const std::string& descriptor) +{ + std::string ret; + Span<const char> sp(descriptor.data(), descriptor.size()); + if (!CheckChecksum(sp, false, &ret)) return ""; + return ret; +} + std::unique_ptr<Descriptor> InferDescriptor(const CScript& script, const SigningProvider& provider) { return InferScript(script, ParseScriptContext::TOP, provider); |