You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 09-features.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,7 @@ The Context column decodes as follows:
42
42
| 22/23 |`option_anchors_zero_fee_htlc_tx`| Anchor commitment type with zero fee HTLC transactions | IN ||[BOLT #3][bolt03-htlc-tx], [lightning-dev][ml-sighash-single-harmful]|
43
43
| 26/27 |`option_shutdown_anysegwit`| Future segwit versions allowed in `shutdown`| IN ||[BOLT #2][bolt02-shutdown]|
44
44
| 44/45 |`option_channel_type`| Node supports the `channel_type` field in open/accept | IN ||[BOLT #2](02-peer-protocol.md#the-open_channel-message)|
45
+
| 48/49 | `option_payment_metadata` | Payment metadata in tlv record | 9 | | [BOLT #11](11-payment-encoding.md#tagged-fields)
Copy file name to clipboardExpand all lines: 11-payment-encoding.md
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,6 +140,8 @@ Currently defined tagged fields are:
140
140
*`p` (1): `data_length` 52. 256-bit SHA256 payment_hash. Preimage of this provides proof of payment.
141
141
*`s` (16): `data_length` 52. This 256-bit secret prevents forwarding nodes from probing the payment recipient.
142
142
*`d` (13): `data_length` variable. Short description of purpose of payment (UTF-8), e.g. '1 cup of coffee' or 'ナンセンス 1杯'
143
+
*`m` (27): `data_length` variable. Additional metadata to attach to the
144
+
payment. Note that the size of this field is limited by the maximum hop payload size. Long metadata fields reduce the maximum route length.
143
145
*`n` (19): `data_length` 53. 33-byte public key of the payee node
144
146
*`h` (23): `data_length` 52. 256-bit description of purpose of payment (SHA256). This is used to commit to an associated description that is over 639 bytes, but the transport mechanism for the description in that case is transport specific and not defined here.
145
147
*`x` (6): `data_length` variable. `expiry` time in seconds (big-endian). Default is 3600 (1 hour) if not specified.
@@ -216,7 +218,8 @@ A reader:
216
218
- MUST use that as [`payment_secret`](04-onion-routing.md#tlv_payload-payload-format)
217
219
- if the `c` field (`min_final_cltv_expiry`) is not provided:
218
220
- MUST use an expiry delta of at least 18 when making the payment
219
-
221
+
- if an `m` field is provided:
222
+
- MUST use that as [`payment_metadata`](04-onion-routing.md#tlv_payload-payload-format)
220
223
### Rationale
221
224
222
225
The type-and-length format allows future extensions to be backward
@@ -235,6 +238,9 @@ by which the description is served is as-yet unspecified and will
235
238
probably be transport dependent. The `h` format could change in the future,
236
239
by changing the length, so readers ignore it if it's not 256 bits.
237
240
241
+
The `m` field allows metadata to be attached to the payment. This supports
242
+
applications where the recipient doesn't keep any context for the payment.
243
+
238
244
The `n` field can be used to explicitly specify the destination node ID,
0 commit comments