| 202 | } |
| 203 | |
| 204 | u8 *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 | |
| 217 | u8 *p2tr_for_keyidx(const tal_t *ctx, struct lightningd *ld, u64 keyidx) |
| 218 | { |
no test coverage detected