aboutsummaryrefslogtreecommitdiff
path: root/src/script/descriptor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/descriptor.h')
-rw-r--r--src/script/descriptor.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/script/descriptor.h b/src/script/descriptor.h
index a34e9f0d8a..eae1e262cd 100644
--- a/src/script/descriptor.h
+++ b/src/script/descriptor.h
@@ -81,6 +81,14 @@ struct Descriptor {
*/
std::unique_ptr<Descriptor> Parse(const std::string& descriptor, FlatSigningProvider& out, bool require_checksum = false);
+/** Get the checksum for a descriptor.
+ *
+ * If it already has one, and it is correct, return the checksum in the input.
+ * If it already has one that is wrong, return "".
+ * If it does not already have one, return the checksum that would need to be added.
+ */
+std::string GetDescriptorChecksum(const std::string& descriptor);
+
/** Find a descriptor for the specified script, using information from provider where possible.
*
* A non-ranged descriptor which only generates the specified script will be returned in all