1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-10-19 19:29:18 +00:00

bip-138 add string content type

This commit is contained in:
pythcoiner
2026-07-14 22:48:57 -04:00
parent 86f5c28f7c
commit 1358003bc8

View File

@@ -325,6 +325,7 @@ remaining bytes are `PADDING`. A `PAYLOAD` MUST contain at least one item (see
| 0x00 | End of content items; padding follows |
| 0x01 | BIP Number (big-endian uint16) |
| 0x02 | Vendor-Specific Opaque Tag |
| 0x03 | String |
`LENGTH`: variable-length integer representing the length of `DATA` in bytes.
@@ -338,6 +339,8 @@ For `TYPE` values defined above:
- 0x01: `LENGTH` MUST be omitted and `DATA` is a 2-byte big-endian unsigned integer
representing the BIP number that defines it.
- 0x02: `DATA` MUST be `LENGTH` bytes of opaque, vendor-specific data.
- 0x03: `DATA` MUST be empty, and the following `PLAINTEXT` is the string itself,
which MUST be valid UTF-8.
For all `TYPE` values except `0x01`, parsers MUST reject `CONTENT` if `LENGTH` exceeds
the remaining payload bytes.