mirror of
https://github.com/lightning/bolts.git
synced 2024-11-19 01:50:03 +01:00
Add a sciddir_or_pubkey
fundamental type
Offers may contain blinded paths to allow for greater recipient privacy. However, they come at a cost of increased QR code size as the introduction node requires a 33-byte `point`. Define a new `sciddir_or_pubkey` fundamental type such that either a point or a reference to one in a `channel_announcement` can be used. This is backwards compatible with `point`. Use this new type for the `blinded_path` subtype's `first_node_id`.
This commit is contained in:
parent
86ba089de7
commit
df4af02eb1
@ -254,6 +254,12 @@ The following convenience types are also defined:
|
|||||||
* `bip340sig`: a 64-byte bitcoin Elliptic Curve Schnorr signature as per [BIP-340](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki)
|
* `bip340sig`: a 64-byte bitcoin Elliptic Curve Schnorr signature as per [BIP-340](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki)
|
||||||
* `point`: a 33-byte Elliptic Curve point (compressed encoding as per [SEC 1 standard](http://www.secg.org/sec1-v2.pdf#subsubsection.2.3.3))
|
* `point`: a 33-byte Elliptic Curve point (compressed encoding as per [SEC 1 standard](http://www.secg.org/sec1-v2.pdf#subsubsection.2.3.3))
|
||||||
* `short_channel_id`: an 8 byte value identifying a channel (see [BOLT #7](07-routing-gossip.md#definition-of-short-channel-id))
|
* `short_channel_id`: an 8 byte value identifying a channel (see [BOLT #7](07-routing-gossip.md#definition-of-short-channel-id))
|
||||||
|
* `sciddir_or_pubkey`: either 9 or 33 bytes referencing or identifying a node, respectively
|
||||||
|
* if the first byte is 0 or 1, then an 8-byte `short_channel_id` follows for a total of 9 bytes
|
||||||
|
* 0 for the first byte indicates this refers to `node_id_1` in the `channel_announcement` for `short_channel_id`
|
||||||
|
* 1 for the first byte indicates this refers to `node_id_2` in the `channel_announcement` for `short_channel_id`
|
||||||
|
(see [BOLT #7](07-routing-gossip.md#the-channel_announcement-message)
|
||||||
|
* if the first byte is 2 or 3, then the value is a 33-byte `point`
|
||||||
* `bigsize`: a variable-length, unsigned integer similar to Bitcoin's CompactSize encoding, but big-endian. Described in [BigSize](#appendix-a-bigsize-test-vectors).
|
* `bigsize`: a variable-length, unsigned integer similar to Bitcoin's CompactSize encoding, but big-endian. Described in [BigSize](#appendix-a-bigsize-test-vectors).
|
||||||
* `utf8`: a byte as part of a UTF-8 string. A writer MUST ensure an array of these is a valid UTF-8 string, a reader MAY reject any messages containing an array of these which is not a valid UTF-8 string.
|
* `utf8`: a byte as part of a UTF-8 string. A writer MUST ensure an array of these is a valid UTF-8 string, a reader MAY reject any messages containing an array of these which is not a valid UTF-8 string.
|
||||||
|
|
||||||
|
@ -440,7 +440,7 @@ intermediary nodes could simply claim the remaining ones.
|
|||||||
|
|
||||||
1. subtype: `blinded_path`
|
1. subtype: `blinded_path`
|
||||||
2. data:
|
2. data:
|
||||||
* [`point`:`first_node_id`]
|
* [`sciddir_or_pubkey`:`first_node_id`]
|
||||||
* [`point`:`first_path_key`]
|
* [`point`:`first_path_key`]
|
||||||
* [`byte`:`num_hops`]
|
* [`byte`:`num_hops`]
|
||||||
* [`num_hops*blinded_path_hop`:`path`]
|
* [`num_hops*blinded_path_hop`:`path`]
|
||||||
|
Loading…
Reference in New Issue
Block a user