Skip to content

Commit 15b2546

Browse files
fiatjafniftynei
authored andcommitted
doc: move "next_onion" and "shared_secret" to inside "onion".
1 parent 8846c35 commit 15b2546

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

doc/PLUGINS.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -944,10 +944,10 @@ The payload of the hook call has the following format:
944944
"type": "legacy",
945945
"short_channel_id": "1x2x3",
946946
"forward_amount": "42msat",
947-
"outgoing_cltv_value": 500014
947+
"outgoing_cltv_value": 500014,
948+
"shared_secret": "0000000000000000000000000000000000000000000000000000000000000000",
949+
"next_onion": "[1365bytes of serialized onion]"
948950
},
949-
"next_onion": "[1365bytes of serialized onion]",
950-
"shared_secret": "0000000000000000000000000000000000000000000000000000000000000000",
951951
"htlc": {
952952
"amount": "43msat",
953953
"cltv_expiry": 500028,
@@ -959,23 +959,24 @@ The payload of the hook call has the following format:
959959

960960
For detailed information about each field please refer to [BOLT 04 of the specification][bolt4], the following is just a brief summary:
961961

962-
- `onion.payload` contains the unparsed payload that was sent to us from the
962+
- `onion`:
963+
- `payload` contains the unparsed payload that was sent to us from the
963964
sender of the payment.
964-
- `onion.type` is `legacy` for realm 0 payments, `tlv` for realm > 1.
965-
- `short_channel_id` determines the channel that the sender is hinting
966-
should be used next. Not present if we're the final destination.
967-
- `forward_amount` is the amount we should be forwarding to the next hop,
968-
and should match the incoming funds in case we are the recipient.
969-
- `outgoing_cltv_value` determines what the CLTV value for the HTLC that we
970-
forward to the next hop should be.
971-
- `total_msat` specifies the total amount to pay, if present.
972-
- `payment_secret` specifies the payment secret (which the payer should have obtained from the invoice), if present.
973-
- `next_onion` is the fully processed onion that we should be sending to the
974-
next hop as part of the outgoing HTLC. Processed in this case means that we
975-
took the incoming onion, decrypted it, extracted the payload destined for
976-
us, and serialized the resulting onion again.
977-
- `shared_secret` is the shared secret we used to decrypt the incoming
978-
onion. It is shared with the sender that constructed the onion.
965+
- `type` is `legacy` for realm 0 payments, `tlv` for realm > 1.
966+
- `short_channel_id` determines the channel that the sender is hinting
967+
should be used next. Not present if we're the final destination.
968+
- `forward_amount` is the amount we should be forwarding to the next hop,
969+
and should match the incoming funds in case we are the recipient.
970+
- `outgoing_cltv_value` determines what the CLTV value for the HTLC that we
971+
forward to the next hop should be.
972+
- `total_msat` specifies the total amount to pay, if present.
973+
- `payment_secret` specifies the payment secret (which the payer should have obtained from the invoice), if present.
974+
- `next_onion` is the fully processed onion that we should be sending to the
975+
next hop as part of the outgoing HTLC. Processed in this case means that we
976+
took the incoming onion, decrypted it, extracted the payload destined for
977+
us, and serialized the resulting onion again.
978+
- `shared_secret` is the shared secret we used to decrypt the incoming
979+
onion. It is shared with the sender that constructed the onion.
979980
- `htlc`:
980981
- `amount` is the amount that we received with the HTLC. This amount minus
981982
the `forward_amount` is the fee that will stay with us.

0 commit comments

Comments
 (0)