lncli: add --amp flag to invoice command

This commit is contained in:
Conner Fromknecht 2021-05-06 09:15:43 -07:00
parent 2be874f340
commit 620e426bc3
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

View File

@ -66,6 +66,11 @@ var addInvoiceCommand = cli.Command{
"private channels in order to assist the " +
"payer in reaching you",
},
cli.BoolFlag{
Name: "amp",
Usage: "creates an AMP invoice. If true, preimage " +
"should not be set.",
},
},
Action: actionDecorator(addInvoice),
}
@ -119,6 +124,7 @@ func addInvoice(ctx *cli.Context) error {
FallbackAddr: ctx.String("fallback_addr"),
Expiry: ctx.Int64("expiry"),
Private: ctx.Bool("private"),
IsAmp: ctx.Bool("amp"),
}
resp, err := client.AddInvoice(ctxc, invoice)