-
Notifications
You must be signed in to change notification settings - Fork 7
/
[METADATA].txt
13 lines (10 loc) · 1.19 KB
/
[METADATA].txt
1
2
3
4
5
6
7
8
9
10
11
12
13
Metadata
Inscriptions may include CBOR metadata, stored as data pushes in fields with tag 5. Since data pushes are limited to 520 bytes, metadata longer than 520 bytes must be split into multiple tag 5 fields, which will then be concatenated before decoding.
Metadata is human readable, and all metadata will be displayed to the user with its inscription. Inscribers are encouraged to consider how metadata will be displayed, and make metadata concise and attractive.
Metadata is rendered to HTML for display as follows:
null, true, false, numbers, floats, and strings are rendered as plain text.
Byte strings are rendered as uppercase hexadecimal.
Arrays are rendered as <ul> tags, with every element wrapped in <li> tags.
Maps are rendered as <dl> tags, with every key wrapped in <dt> tags, and every value wrapped in <dd> tags.
Tags are rendered as the tag , enclosed in a <sup> tag, followed by the value.
CBOR is a complex spec with many different data types, and multiple ways of representing the same data. Exotic data types, such as tags, floats, and bignums, and encoding such as indefinite values, may fail to display correctly or at all. Contributions to ord to remedy this are welcome.