| 209 | } |
| 210 | |
| 211 | u8 *p2wpkh_for_keyidx(const tal_t *ctx, struct lightningd *ld, u64 keyidx) |
| 212 | { |
| 213 | struct pubkey shutdownkey; |
| 214 | |
| 215 | /* Use BIP86 derivation if wallet has BIP86 base, otherwise use BIP32 */ |
| 216 | if (ld->bip86_base) { |
| 217 | bip86_pubkey(ld, &shutdownkey, keyidx); |
| 218 | } else { |
| 219 | bip32_pubkey(ld, &shutdownkey, keyidx); |
| 220 | } |
| 221 | return scriptpubkey_p2wpkh(ctx, &shutdownkey); |
| 222 | } |
| 223 | |
| 224 | u8 *p2tr_for_keyidx(const tal_t *ctx, struct lightningd *ld, u64 keyidx) |
| 225 | { |
no test coverage detected