mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 17:55:36 +01:00
cmd/lncli: add new taproot channel type for openchannel
This commit is contained in:
parent
4aa9bba4ef
commit
6dc43ad253
1 changed files with 8 additions and 4 deletions
|
@ -61,6 +61,7 @@ Signed base64 encoded PSBT or hex encoded raw wire TX (or path to file): `
|
||||||
|
|
||||||
channelTypeTweakless = "tweakless"
|
channelTypeTweakless = "tweakless"
|
||||||
channelTypeAnchors = "anchors"
|
channelTypeAnchors = "anchors"
|
||||||
|
channelTypeSimpleTaproot = "taproot"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO(roasbeef): change default number of confirmations.
|
// TODO(roasbeef): change default number of confirmations.
|
||||||
|
@ -253,8 +254,9 @@ var openChannelCommand = cli.Command{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "channel_type",
|
Name: "channel_type",
|
||||||
Usage: fmt.Sprintf("(optional) the type of channel to "+
|
Usage: fmt.Sprintf("(optional) the type of channel to "+
|
||||||
"propose to the remote peer (%q, %q)",
|
"propose to the remote peer (%q, %q, %q)",
|
||||||
channelTypeTweakless, channelTypeAnchors),
|
channelTypeTweakless, channelTypeAnchors,
|
||||||
|
channelTypeSimpleTaproot),
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "zero_conf",
|
Name: "zero_conf",
|
||||||
|
@ -443,6 +445,8 @@ func openChannel(ctx *cli.Context) error {
|
||||||
req.CommitmentType = lnrpc.CommitmentType_STATIC_REMOTE_KEY
|
req.CommitmentType = lnrpc.CommitmentType_STATIC_REMOTE_KEY
|
||||||
case channelTypeAnchors:
|
case channelTypeAnchors:
|
||||||
req.CommitmentType = lnrpc.CommitmentType_ANCHORS
|
req.CommitmentType = lnrpc.CommitmentType_ANCHORS
|
||||||
|
case channelTypeSimpleTaproot:
|
||||||
|
req.CommitmentType = lnrpc.CommitmentType_SIMPLE_TAPROOT
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("unsupported channel type %v", channelType)
|
return fmt.Errorf("unsupported channel type %v", channelType)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue