MCPcopy Create free account
hub / github.com/ElementsProject/lightning / p2wpkh_for_keyidx

Function p2wpkh_for_keyidx

lightningd/peer_control.c:204–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204u8 *p2wpkh_for_keyidx(const tal_t *ctx, struct lightningd *ld, u64 keyidx)
205{
206 struct pubkey shutdownkey;
207
208 /* Use BIP86 derivation if wallet has BIP86 base, otherwise use BIP32 */
209 if (ld->bip86_base) {
210 bip86_pubkey(ld, &shutdownkey, keyidx);
211 } else {
212 bip32_pubkey(ld, &shutdownkey, keyidx);
213 }
214 return scriptpubkey_p2wpkh(ctx, &shutdownkey);
215}
216
217u8 *p2tr_for_keyidx(const tal_t *ctx, struct lightningd *ld, u64 keyidx)
218{

Callers 4

finish_psbtFunction · 0.85
json_addpsbtoutputFunction · 0.85
new_channelFunction · 0.85
json_closeFunction · 0.85

Calls 3

scriptpubkey_p2wpkhFunction · 0.85
bip86_pubkeyFunction · 0.70
bip32_pubkeyFunction · 0.70

Tested by

no test coverage detected