aboutsummaryrefslogtreecommitdiff
path: root/src/script/descriptor.h
diff options
context:
space:
mode:
authorMeshCollider <dobsonsa68@gmail.com>2018-12-19 15:54:40 +1300
committerMeshCollider <dobsonsa68@gmail.com>2019-06-06 22:03:55 +1200
commita4d1bd1a29be2dcc5e00c63b6b41916b1c466de0 (patch)
tree1903812b9613b0c5183dbf583dfa82d4f31cfb03 /src/script/descriptor.h
parent03858b23fe1d17e681eb18d24602b276020295a0 (diff)
Add private key derivation functions to descriptors
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 907a102284..af7ae229ca 100644
--- a/src/script/descriptor.h
+++ b/src/script/descriptor.h
@@ -60,6 +60,14 @@ struct Descriptor {
* out: scripts and public keys necessary for solving the expanded scriptPubKeys will be put here (may be equal to provider).
*/
virtual bool ExpandFromCache(int pos, const std::vector<unsigned char>& cache, std::vector<CScript>& output_scripts, FlatSigningProvider& out) const = 0;
+
+ /** Expand the private key for a descriptor at a specified position, if possible.
+ *
+ * pos: the position at which to expand the descriptor. If IsRange() is false, this is ignored.
+ * provider: the provider to query for the private keys.
+ * out: any private keys available for the specified pos will be placed here.
+ */
+ virtual void ExpandPrivate(int pos, const SigningProvider& provider, FlatSigningProvider& out) const = 0;
};
/** Parse a descriptor string. Included private keys are put in out.