mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-15 19:18:11 +00:00
794 B
794 B
Ethereum definition binary format
Definitions are binary encoded and have a special format:
- prefix:
- format version of the definition (UTF-8 string
trzd
+ version number, padded with zeroes if shorter, 8 bytes) - type of data (unsigned integer, 1 byte)
- data version of the definition (unsigned integer, 4 bytes)
- length of the encoded protobuf message - payload length in bytes (unsigned integer, 2 bytes)
- format version of the definition (UTF-8 string
- payload: serialized form of protobuf message EthereumNetworkInfo or EthereumTokenInfo (N bytes)
- suffix:
- length of the Merkle tree proof - number of hashes in the proof (unsigned integer, 1 byte)
- proof - individual hashes used to compute Merkle tree root hash (plain bits, N*32 bytes)
- signed Merkle tree root hash (plain bits, 64 bytes)