Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction Metadata overview: Correct ranges of 64bit integers #1177

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/transaction-metadata/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ The Cardano Foundation's integrations team hosted a session on transaction metad

Metadata can be expressed as a `JSON` object with some restrictions:

All top-level keys must be **integers** between 0 and 2^64 - 1. Each metadata value is tagged with its type. **Strings** must be at most 64 bytes when UTF-8 is encoded. **Bytestrings** are hex-encoded, with a maximum length of 64 bytes. Metadata aren't stored as `JSON` on the Cardano blockchain but are instead stored using a compact binary encoding (**CBOR**).
All top-level keys must be **integers** between 0 and 2^63 - 1. Each metadata value is tagged with its type. **Strings** must be at most 64 bytes when UTF-8 is encoded. **Bytestrings** are hex-encoded, with a maximum length of 64 bytes. Metadata aren't stored as `JSON` on the Cardano blockchain but are instead stored using a compact binary encoding (**CBOR**).

The binary encoding of metadata values supports three simple types:

- Integers in the range `-(2^64 - 1) to 2^64 - 1`
- Integers in the range `-(2^63) to 2^63 - 1`
- Strings (`UTF-8` encoded)
- Bytestrings
- And two compound types:
Expand Down