multi: add p2tr keyspend wallet support

This commit is contained in:
Oliver Gugger
2022-03-18 18:37:46 +01:00
parent f130eddb92
commit c73cf03a55
24 changed files with 416 additions and 163 deletions

View File

@@ -139,7 +139,8 @@ var newAddressCommand = cli.Command{
Description: `
Generate a wallet new address. Address-types has to be one of:
- p2wkh: Pay to witness key hash
- np2wkh: Pay to nested witness key hash`,
- np2wkh: Pay to nested witness key hash
- p2tr: Pay to taproot pubkey`,
Action: actionDecorator(newAddress),
}
@@ -161,6 +162,8 @@ func newAddress(ctx *cli.Context) error {
addrType = lnrpc.AddressType_WITNESS_PUBKEY_HASH
case "np2wkh":
addrType = lnrpc.AddressType_NESTED_PUBKEY_HASH
case "p2tr":
addrType = lnrpc.AddressType_TAPROOT_PUBKEY
default:
return fmt.Errorf("invalid address type %v, support address type "+
"are: p2wkh and np2wkh", stringAddrType)