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
1.`signature`: bitcoin-style signature of above (520 bits)
93
86
94
87
## Requirements
@@ -108,7 +101,7 @@ field specified below).
108
101
## Rationale
109
102
110
103
`signature` covers an exact number of bytes even though the SHA-2
111
-
standard actually supports hashing in bit boundaries because it's not widely
104
+
standard actually supports hashing in bit boundaries, because it's not widely
112
105
implemented. The recovery ID allows public-key recovery, so the
113
106
identity of the payee node can be implied.
114
107
@@ -123,13 +116,13 @@ Each Tagged Field is of the form:
123
116
Currently defined tagged fields are:
124
117
125
118
*`p` (1): `data_length` 52. 256-bit SHA256 payment_hash. Preimage of this provides proof of payment
126
-
*`d` (13): `data_length` variable. short description of purpose of payment (ASCII), e.g. '1 cup of coffee'
119
+
*`d` (13): `data_length` variable. Short description of purpose of payment (ASCII), e.g. '1 cup of coffee'
127
120
*`n` (19): `data_length` 53. 33-byte public key of the payee node
128
121
*`h` (23): `data_length` 52. 256-bit description of purpose of payment (SHA256). This is used to commit to an associated description that is too long to fit, such as on a web page.
129
122
*`x` (6): `data_length` variable. `expiry` time in seconds (big-endian). Default is 3600 (1 hour) if not specified.
130
123
*`c` (24): `data_length` variable. `min_final_cltv_expiry` to use for the last HTLC in the route. Default is 9 if not specified.
131
124
*`f` (9): `data_length` variable, depending on version. Fallback on-chain address: for bitcoin, this starts with a 5-bit `version` and contains a witness program or P2PKH or P2SH address.
132
-
*`r` (3): `data_length` variable. one or more entries containing extra routing information for a private route; there may be more than one `r` field
125
+
*`r` (3): `data_length` variable. One or more entries containing extra routing information for a private route; there may be more than one `r` field
133
126
*`pubkey` (264 bits)
134
127
*`short_channel_id` (64 bits)
135
128
*`fee_base_msat` (32 bits, big-endian)
@@ -167,7 +160,7 @@ public channel associated with its public key. The `r` field MUST contain
167
160
one or more ordered entries, indicating the forward route from a
168
161
public node to the final destination. For each entry, the `pubkey` is the
169
162
node ID of the start of the channel; `short_channel_id` is the short channel ID
170
-
field to identify the channel; and `fee_base_msat`, `fee_proportional_millionths` and `cltv_expiry_delta` are as specified in [BOLT #7](07-routing-gossip.md#the-channel_update-message). A writer MAY include more than one `r` field to
163
+
field to identify the channel; and `fee_base_msat`, `fee_proportional_millionths`, and `cltv_expiry_delta` are as specified in [BOLT #7](07-routing-gossip.md#the-channel_update-message). A writer MAY include more than one `r` field to
171
164
provide multiple routing options.
172
165
173
166
A writer MUST pad field data to a multiple of 5 bits, using zeroes.
*`38ec6891345e204145be8a3a99de38e98a39d6a569434e1845c8af7205afcfcc7f425fcd1463e93c32881ead0d6e356d467ec8c02553f9aab15e5738b11f127f` hex of signature data (32byte r, 32byte s)
278
+
*`38ec6891345e204145be8a3a99de38e98a39d6a569434e1845c8af7205afcfcc7f425fcd1463e93c32881ead0d6e356d467ec8c02553f9aab15e5738b11f127f` hex of signature data (32-byte r, 32-byte s)
286
279
*`0` (int) recovery flag contained in `signature`
287
280
*`6c6e62630b25fe64410d00004080c1014181c20240004080c1014181c20240004080c1014181c202404081a1fa83632b0b9b29031b7b739b4b232b91039bab83837b93a34b733903a3434b990383937b532b1ba0` hex of data for signing (prefix + data after separator up to the start of the signature)
288
281
*`c3d4e83f646fa79a393d75277b1d858db1d1f7ab7137dcb7835db2ecd518e1c9` hex of SHA256 of the preimage
*`e89639ba6814e36689d4b91bf125f10351b55da057b00647a8dabaeb8a90c95f160f9d5a6e0f79d1fc2b964238b944e2fa4aa677c6f020d466472ab842bd750e` hex of signature data (32byte r, 32byte s)
302
+
*`e89639ba6814e36689d4b91bf125f10351b55da057b00647a8dabaeb8a90c95f160f9d5a6e0f79d1fc2b964238b944e2fa4aa677c6f020d466472ab842bd750e` hex of signature data (32-byte r, 32-byte s)
310
303
*`1` (int) recovery flag contained in `signature`
311
304
*`6c6e626332353030750b25fe64410d00004080c1014181c20240004080c1014181c20240004080c1014181c202404081a0a189031bab81031b7b33332b2818020f00` hex of data for signing (prefix + data after separator up to the start of the signature)
312
305
*`3cd6ef07744040556e01be64f68fd9e1565fb47d78c42308b1ee005aca5a0d86` hex of SHA256 of the preimage
*`8yjmdan79s6qqdhdzgynm4zwqd5d7xmw5fk98klysy043l2ahrqs`: SHA256 of 'One piece of chocolate cake, one icecream cone, one pickle, one slice of swiss cheese, one slice of salami, one lollypop, one piece of cherry pie, one sausage, one cupcake, and one slice of watermelon'
*`c63486e81f8c878a105bc9d959af1973854c4dc552c4f0e0e0c7389603d6bdc67707bf6be992a8ce7bf50016bb41d8a9b5358652c4960445a170d049ced4558c` hex of signature data (32byte r, 32byte s)
323
+
*`c63486e81f8c878a105bc9d959af1973854c4dc552c4f0e0e0c7389603d6bdc67707bf6be992a8ce7bf50016bb41d8a9b5358652c4960445a170d049ced4558c` hex of signature data (32-byte r, 32-byte s)
331
324
*`0` (int) recovery flag contained in `signature`
332
325
*`6c6e626332306d0b25fe64410d00004080c1014181c20240004080c1014181c20240004080c1014181c202404082e1a1c92db7b3f161a001b7689049eea2701b46f8db7513629edf2408fac7eaedc60800` hex of data for signing (prefix + data after separator up to the start of the signature)
333
326
*`b6025e8a10539dddbcbe6840a9650707ae3f147b8dcfda338561ada710508916` hex of SHA256 of the preimage
@@ -344,13 +337,13 @@ Breakdown:
344
337
*`h`: tagged field: hash of description...
345
338
*`p`: payment hash...
346
339
*`f`: tagged field: fallback address
347
-
*`pp`: `data_length` (`p` = 1. 1 * 32 + 1 == 33)
340
+
*`pp`: `data_length` (`p` = 1; 1 * 32 + 1 == 33)
348
341
*`3` = 17, so P2PKH address
349
342
*`x9et2e20v6pu37c5d9vax37wxq72un98`: 160 bit P2PKH address
*`b6c42b8a61e0dc5823ea63e76ff148ab5f6c86f45f9722af0069c7934daff70d5e315893300774c897995e3a7476c8193693d144a36e2645a0851e6ebafc9d0a` hex of signature data (32byte r, 32byte s)
346
+
*`b6c42b8a61e0dc5823ea63e76ff148ab5f6c86f45f9722af0069c7934daff70d5e315893300774c897995e3a7476c8193693d144a36e2645a0851e6ebafc9d0a` hex of signature data (32-byte r, 32-byte s)
354
347
*`1` (int) recovery flag contained in `signature`
355
348
*`6c6e746232306d0b25fe64570d0e496dbd9f8b0d000dbb44824f751380da37c6dba89b14f6f92047d63f576e304021a000081018202830384048000810182028303840480008101820283038404808102421898b95ab2a7b341e47d8a34ace9a3e7181e5726538` hex of data for signing (prefix + data after separator up to the start of the signature)
356
349
*`00c17b39642becc064615ef196a6cc0cce262f1d8dde7b3c23694aeeda473abe` hex of SHA256 of the preimage
@@ -367,16 +360,16 @@ Breakdown:
367
360
*`p`: payment hash...
368
361
*`h`: tagged field: hash of description...
369
362
*`f`: tagged field: fallback address
370
-
*`pp`: `data_length` (`p` = 1. 1 * 32 + 1 == 33)
363
+
*`pp`: `data_length` (`p` = 1; 1 * 32 + 1 == 33)
371
364
*`3` = 17, so P2PKH address
372
365
*`qjmp7lwpagxun9pygexvgpjdc4jdj85f`: 160 bit P2PKH address
*`91675cb3fad8e9d915343883a49242e074474e26d42c7ed914655689a8074553733e8e4ea5ce9b85f69e40d755a55014536b12323f8b220600c94ef2b9c51428` hex of signature data (32byte r, 32byte s)
372
+
*`91675cb3fad8e9d915343883a49242e074474e26d42c7ed914655689a8074553733e8e4ea5ce9b85f69e40d755a55014536b12323f8b220600c94ef2b9c51428` hex of signature data (32-byte r, 32-byte s)
380
373
*`0` (int) recovery flag contained in `signature`
381
374
*`6c6e626332306d0b25fe64410d00004080c1014181c20240004080c1014181c20240004080c1014181c202404082e1a1c92db7b3f161a001b7689049eea2701b46f8db7513629edf2408fac7eaedc60824218825b0fbee0f506e4ca122326620326e2b26c8f448ca4029e03a901b85534ff1e92c43c74431f7ce72046060fcf7a95c37e148f78c77255010203040506070800000001000000140003039e03a901b85534ff1e92c43c74431f7ce72046060fcf7a95c37e148f78c77255030405060708090a000000020000001e00040` hex of data for signing (prefix + data after separator up to the start of the signature)
382
375
*`ff68246c5ad4b48c90cf8ff3b33b5cea61e62f08d0e67910ffdce1edecade71b` hex of SHA256 of the preimage
@@ -393,13 +386,13 @@ Breakdown:
393
386
*`h`: tagged field: hash of description...
394
387
*`p`: payment hash...
395
388
*`f`: tagged field: fallback address
396
-
*`pp`: `data_length` (`p` = 1. 1 * 32 + 1 == 33)
389
+
*`pp`: `data_length` (`p` = 1; 1 * 32 + 1 == 33)
397
390
*`j` = 18, so P2SH address
398
391
*`3a24vwu6r8ejrss3axul8rxldph2q7z9`: 160 bit P2SH address
*`b6c6860fc6ff41bafba1745b538b6a7c6c2c0234f76bf817bf567be88cf2c632492c9dd279470841cd1e21a33ae7ed59b25809bf9b3366fe81881651589f5d15` hex of signature data (32byte r, 32byte s)
395
+
*`b6c6860fc6ff41bafba1745b538b6a7c6c2c0234f76bf817bf567be88cf2c632492c9dd279470841cd1e21a33ae7ed59b25809bf9b3366fe81881651589f5d15` hex of signature data (32-byte r, 32-byte s)
403
396
*`0` (int) recovery flag contained in `signature`
404
397
*`6c6e626332306d0b25fe64570d0e496dbd9f8b0d000dbb44824f751380da37c6dba89b14f6f92047d63f576e304021a000081018202830384048000810182028303840480008101820283038404808102421947aaab1dcd0cf990e108f4dcf9c66fb437503c228` hex of data for signing (prefix + data after separator up to the start of the signature)
405
398
*`64f1ff500bcc62a1b211cd6db84a1d93d1f77c6a132904465b6ff912420176be` hex of SHA256 of the preimage
*`c8583b8f65853d7cc90f0eb4ae0e92a606f89caf4f7d65048142d7bbd4e5f3623ef407a75458e4b20f00efbc734f1c2eefc419f3a2be6d51038016ffb35cd613` hex of signature data (32byte r, 32byte s)
416
+
*`c8583b8f65853d7cc90f0eb4ae0e92a606f89caf4f7d65048142d7bbd4e5f3623ef407a75458e4b20f00efbc734f1c2eefc419f3a2be6d51038016ffb35cd613` hex of signature data (32-byte r, 32-byte s)
424
417
*`0` (int) recovery flag contained in `signature`
425
418
*`6c6e626332306d0b25fe64570d0e496dbd9f8b0d000dbb44824f751380da37c6dba89b14f6f92047d63f576e304021a00008101820283038404800081018202830384048000810182028303840480810242103a8f3b740cc8cb6a2a4a0e22e8d9d191f8a19deb0` hex of data for signing (prefix + data after separator up to the start of the signature)
426
419
*`b3df27aaa01d891cc9de272e7609557bdf4bd6fd836775e4470502f71307b627` hex of SHA256 of the preimage
*`51e4f6446e410a164a6da9f39507e730c26241b4456ab6ea28d1b12c71ef8ca20c9cfe3dffc07d9f8db671ecaa4d20beedb193bda8ce37c59f85f82773a55d47` hex of signature data (32byte r, 32byte s)
437
+
*`51e4f6446e410a164a6da9f39507e730c26241b4456ab6ea28d1b12c71ef8ca20c9cfe3dffc07d9f8db671ecaa4d20beedb193bda8ce37c59f85f82773a55d47` hex of signature data (32-byte r, 32-byte s)
445
438
*`0` (int) recovery flag contained in `signature`
446
439
*`6c6e626332306d0b25fe64570d0e496dbd9f8b0d000dbb44824f751380da37c6dba89b14f6f92047d63f576e304021a00008101820283038404800081018202830384048000810182028303840480810243500c318a1e0a628b34025e8c9019ab6d09b64c2b3c66a693d0dc63194b02481931000` hex of data for signing (prefix + data after separator up to the start of the signature)
447
440
*`399a8b167029fda8564fd2e99912236b0b8017e7d17e416ae17307812c92cf42` hex of SHA256 of the preimage
0 commit comments