Skip to content

Commit

Permalink
BOLT 1: Add utf8 type.
Browse files Browse the repository at this point in the history
It's far easier to validate these on parsing than to hand-validate them
elsewhere.

I didn't turn `alias` or `error` into this, though they're similar
(`alias` can have a nul terminator).

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Sep 24, 2024
1 parent 0277f42 commit 4e0e384
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions 01-messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ The following convenience types are also defined:
* `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))
* `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.

## Setup Messages

Expand Down

0 comments on commit 4e0e384

Please sign in to comment.