You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
descriptor: ToPrivateString() pass if at least 1 priv key exists
- Refactor Descriptor::ToPrivateString() to allow descriptors with
missing private keys to be printed. Useful in descriptors with
multiple keys e.g tr() etc.
- The existing behaviour of listdescriptors is preserved as much as
possible, if no private keys are availablle ToPrivateString will
return false
/** 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. */
Copy file name to clipboardExpand all lines: src/test/descriptor_tests.cpp
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ constexpr int SIGNABLE = 1 << 3; // We can sign with this descriptor (this is no
49
49
constexprint DERIVE_HARDENED = 1 << 4; // The final derivation is hardened, i.e. ends with *' or *h
50
50
constexprint MIXED_PUBKEYS = 1 << 5;
51
51
constexprint XONLY_KEYS = 1 << 6; // X-only pubkeys are in use (and thus inferring/caching may swap parity of pubkeys/keyids)
52
-
constexprint MISSING_PRIVKEYS = 1 << 7; // Not all private keys are available. ToPrivateString() will fail and HavePrivateKeys() will return `false`.
52
+
constexprint MISSING_PRIVKEYS = 1 << 7; // Not all private keys are available. ToPrivateString() will return true if there is at least one private key and HavePrivateKeys() will return `false`.
53
53
constexprint SIGNABLE_FAILS = 1 << 8; // We can sign with this descriptor, but actually trying to sign will fail
54
54
constexprint MUSIG = 1 << 9; // This is a MuSig so key counts will have an extra key
55
55
constexprint MUSIG_DERIVATION = 1 << 10; // MuSig with BIP 328 derivation from the aggregate key
0 commit comments