Skip to content

Commit 287f0ac

Browse files
committed
doc: recommend injectpaymentonion in place of sendonion.
Among other things, injectpaymentonion insists on knowing the destination amount_msat. Signed-off-by: Rusty Russell <[email protected]>
1 parent 4ebd2a4 commit 287f0ac

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

contrib/msggen/msggen/schema.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21942,7 +21942,7 @@
2194221942
"amount_msat": {
2194321943
"type": "msat",
2194421944
"description": [
21945-
"The amount of millisatoshi we intended to send to the destination."
21945+
"The amount of millisatoshi we intended to send to the destination. This can only be missing in the case of someone manually calling sendonion without the `amount_msat` parameter (which no plugin currently does)."
2194621946
]
2194721947
},
2194821948
"amount_sent_msat": {
@@ -24449,7 +24449,7 @@
2444924449
"amount_msat": {
2445024450
"type": "msat",
2445124451
"description": [
24452-
"The amount delivered to destination (if known). This is not known in the case where sendonion(7) was used to initiate the payment without the `amount_msat` parameter."
24452+
"The amount delivered to destination (if known). This is not known in the case where sendonion(7) was used to manually initiate a payment without the `amount_msat` parameter."
2445324453
]
2445424454
},
2445524455
"destination": {
@@ -29732,6 +29732,7 @@
2973229732
"rpc": "sendonion",
2973329733
"title": "Send a payment with a custom onion packet",
2973429734
"description": [
29735+
"Note: you probably want to use the more modern and flexible `injectpaymentonion` command instead of this.",
2973529736
"The **sendonion** RPC command can be used to initiate a payment attempt with a custom onion packet. The onion packet is used to deliver instructions for hops along the route on how to behave. Normally these instructions are indications on where to forward a payment and what parameters to use, or contain details of the payment for the final hop. However, it is possible to add arbitrary information for hops in the custom onion, allowing for custom extensions that are not directly supported by Core Lightning.",
2973629737
"",
2973729738
"If the first element of *route* does not have \"channel\" set, a suitable channel (if any) will be chosen, otherwise that specific short-channel-id is used. The following is an example of a 3 hop onion:",
@@ -30057,6 +30058,7 @@
3005730058
"Christian Decker <<[email protected]>> is mainly responsible."
3005830059
],
3005930060
"see_also": [
30061+
"lightning-injectpaymentonion(7)",
3006030062
"lightning-createonion(7)",
3006130063
"lightning-sendpay(7)",
3006230064
"lightning-listsendpays(7)"

doc/schemas/sendonion.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"rpc": "sendonion",
55
"title": "Send a payment with a custom onion packet",
66
"description": [
7+
"Note: you probably want to use the more modern and flexible `injectpaymentonion` command instead of this.",
78
"The **sendonion** RPC command can be used to initiate a payment attempt with a custom onion packet. The onion packet is used to deliver instructions for hops along the route on how to behave. Normally these instructions are indications on where to forward a payment and what parameters to use, or contain details of the payment for the final hop. However, it is possible to add arbitrary information for hops in the custom onion, allowing for custom extensions that are not directly supported by Core Lightning.",
89
"",
910
"If the first element of *route* does not have \"channel\" set, a suitable channel (if any) will be chosen, otherwise that specific short-channel-id is used. The following is an example of a 3 hop onion:",
@@ -329,6 +330,7 @@
329330
"Christian Decker <<[email protected]>> is mainly responsible."
330331
],
331332
"see_also": [
333+
"lightning-injectpaymentonion(7)",
332334
"lightning-createonion(7)",
333335
"lightning-sendpay(7)",
334336
"lightning-listsendpays(7)"

0 commit comments

Comments
 (0)