lightningd: store base and derive pubkeys locally

RIP to this commit there's a good chance a lot of this code doesn't even make this into the final PR. Pour one out for the fallen lines of code.

This commit is doing the rest of the derivation. There was a significant overlap between the bip32_pubkey derivation and the bip86_pubkey derivation so that has been refactored in one place.
This commit is contained in:
Sangbida Chaudhuri
2025-10-24 13:57:46 +10:30
committed by Rusty Russell
parent 63001745ca
commit 1665665271
7 changed files with 84 additions and 3 deletions

View File

@@ -140,7 +140,6 @@ bool hsmd_check_client_capabilities(struct hsmd_client *client,
case WIRE_HSMD_DERIVE_BIP86_KEY:
case WIRE_HSMD_CHECK_BIP86_PUBKEY:
return (client->capabilities & HSM_PERM_DERIVE_BIP86_KEY) != 0;
case WIRE_HSMD_INIT:
case WIRE_HSMD_DEV_PREINIT:
case WIRE_HSMD_NEW_CHANNEL:

View File

@@ -11,7 +11,6 @@
#define HSM_PERM_SIGN_WILL_FUND_OFFER 64
#define HSM_PERM_SIGN_SPLICE_TX 128
#define HSM_PERM_LOCK_OUTPOINT 256
#define HSM_PERM_DERIVE_BIP86_KEY 512
#define HSM_PERM_MASTER 1024
#endif /* LIGHTNING_HSMD_PERMISSIONS_H */