mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-10 17:44:22 +01:00
sendonion: add bolt11 arg.
And document the partid arg. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: JSON-RPC: `sendonion` has a new optional `bolt11` argument for when it's used to pay an invoice.
This commit is contained in:
committed by
Christian Decker
parent
f4f2853ded
commit
71a2aefafd
10
doc/lightning-sendonion.7
generated
10
doc/lightning-sendonion.7
generated
@@ -3,7 +3,7 @@
|
||||
lightning-sendonion - Send a payment with a custom onion packet
|
||||
.SH SYNOPSIS
|
||||
|
||||
\fBsendonion\fR \fIonion\fR \fIfirst_hop\fR \fIpayment_hash\fR [\fIlabel\fR] [\fIshared_secrets\fR]
|
||||
\fBsendonion\fR \fIonion\fR \fIfirst_hop\fR \fIpayment_hash\fR [\fIlabel\fR] [\fIshared_secrets\fR] [\fIpartid\fR] [\fIbolt11\fR]
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -81,6 +81,14 @@ If \fIshared_secrets\fR is not provided the c-lightning node does not know how
|
||||
long the route is, which channels or nodes are involved, and what an eventual
|
||||
error could have been\. It can therefore be used for oblivious payments\.
|
||||
|
||||
|
||||
The \fIpartid\fR value, if provided and non-zero, allows for multiple parallel
|
||||
partial payments with the same \fIpayment_hash\fR\.
|
||||
|
||||
|
||||
The \fIbolt11\fR parameter, if provided, will be returned in
|
||||
\fIwaitsendpay\fR and \fIlistsendpays\fR results\.
|
||||
|
||||
.SH RETURN VALUE
|
||||
|
||||
On success, an object similar to the output of \fBsendpay\fR will be
|
||||
|
||||
@@ -4,7 +4,7 @@ lightning-sendonion -- Send a payment with a custom onion packet
|
||||
SYNOPSIS
|
||||
--------
|
||||
|
||||
**sendonion** *onion* *first_hop* *payment_hash* \[*label*\] \[*shared_secrets*\]
|
||||
**sendonion** *onion* *first_hop* *payment_hash* \[*label*\] \[*shared_secrets*\] \[*partid*\] \[*bolt11*\]
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
@@ -72,6 +72,12 @@ If *shared_secrets* is not provided the c-lightning node does not know how
|
||||
long the route is, which channels or nodes are involved, and what an eventual
|
||||
error could have been. It can therefore be used for oblivious payments.
|
||||
|
||||
The *partid* value, if provided and non-zero, allows for multiple parallel
|
||||
partial payments with the same *payment_hash*.
|
||||
|
||||
The *bolt11* parameter, if provided, will be returned in
|
||||
*waitsendpay* and *listsendpays* results.
|
||||
|
||||
RETURN VALUE
|
||||
------------
|
||||
|
||||
|
||||
@@ -1183,7 +1183,7 @@ static struct command_result *json_sendonion(struct command *cmd,
|
||||
struct route_hop *first_hop;
|
||||
struct sha256 *payment_hash;
|
||||
struct lightningd *ld = cmd->ld;
|
||||
const char *label;
|
||||
const char *label, *b11str;
|
||||
struct secret *path_secrets;
|
||||
u64 *partid;
|
||||
|
||||
@@ -1194,6 +1194,7 @@ static struct command_result *json_sendonion(struct command *cmd,
|
||||
p_opt("label", param_escaped_string, &label),
|
||||
p_opt("shared_secrets", param_secrets_array, &path_secrets),
|
||||
p_opt_def("partid", param_u64, &partid, 0),
|
||||
p_opt("bolt11", param_string, &b11str),
|
||||
NULL))
|
||||
return command_param_failed();
|
||||
|
||||
@@ -1207,7 +1208,7 @@ static struct command_result *json_sendonion(struct command *cmd,
|
||||
|
||||
return send_payment_core(ld, cmd, payment_hash, *partid,
|
||||
first_hop, AMOUNT_MSAT(0), AMOUNT_MSAT(0),
|
||||
label, NULL, &packet, NULL, NULL, NULL,
|
||||
label, b11str, &packet, NULL, NULL, NULL,
|
||||
path_secrets);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user