cmd/lncli: update the sendpayment usage documentation

This commit is contained in:
Olaoluwa Osuntokun 2018-01-19 17:33:03 -08:00
parent 84c8ed6362
commit 246ba98f47
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -951,8 +951,28 @@ func listChannels(ctx *cli.Context) error {
var sendPaymentCommand = cli.Command{ var sendPaymentCommand = cli.Command{
Name: "sendpayment", Name: "sendpayment",
Usage: "send a payment over lightning", Usage: "send a payment over lightning",
ArgsUsage: "(destination amount payment_hash " + Description: `
"| --pay_req=[payment request])", Send a payment over Lightning. One can either specify the full
parameters of the payment, or just use a payment request which encodes
all the payment details.
If payment isn't manually specified, then only a payment request needs
to be passed using the --pay_req argument.
If the payment *is* manually specified, then all four alternative
arguments need to be specified in order to complete the payment:
* --dest=N
* --amt=A
* --final_ctlv_delta=T
* --payment_hash=H
The --debug_send flag is provided for usage *purely* in test
environments. If specified, then the payment hash isn't required, as
it'll use the hash of all zeroes. This mode allows one to quickly test
payment connectivity without having to create an invoice at the
destination.
`,
ArgsUsage: "dest amt payment_hash final_cltv_delta | --pay_req=[payment request]",
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "dest, d", Name: "dest, d",