Skip to main content

mina_base58/
version.rs

1//! Version bytes for Mina base58check encodings.
2//!
3//! Mirrors the OCaml definitions in [`version_bytes.ml`].
4//!
5//! Bytes `0x07`–`0x09` are unassigned in the Mina protocol (the OCaml
6//! source skips straight from `0x06` to `0x0a`).
7//!
8//! [`version_bytes.ml`]: https://github.com/MinaProtocol/mina/blob/master/src/lib/base58_check/version_bytes.ml
9
10/// Coinbase transaction.
11pub const COINBASE: u8 = 0x01;
12/// Secret-box encrypted bytes.
13pub const SECRET_BOX_BYTESWR: u8 = 0x02;
14/// Single fee transfer.
15pub const FEE_TRANSFER_SINGLE: u8 = 0x03;
16/// Frontier hash (Merkle tree frontier).
17pub const FRONTIER_HASH: u8 = 0x04;
18/// Ledger hash.
19pub const LEDGER_HASH: u8 = 0x05;
20/// Lite precomputed block.
21pub const LITE_PRECOMPUTED: u8 = 0x06;
22// 0x07–0x09 are unassigned.
23/// SNARK proof.
24pub const PROOF: u8 = 0x0a;
25/// Random oracle base element.
26pub const RANDOM_ORACLE_BASE: u8 = 0x0b;
27/// Receipt chain hash.
28pub const RECEIPT_CHAIN_HASH: u8 = 0x0c;
29/// Epoch seed.
30pub const EPOCH_SEED: u8 = 0x0d;
31/// Staged ledger hash auxiliary data hash.
32pub const STAGED_LEDGER_HASH_AUX_HASH: u8 = 0x0e;
33/// Staged ledger hash pending coinbase auxiliary data.
34pub const STAGED_LEDGER_HASH_PENDING_COINBASE_AUX: u8 = 0x0f;
35/// Protocol state hash.
36pub const STATE_HASH: u8 = 0x10;
37/// Protocol state body hash.
38pub const STATE_BODY_HASH: u8 = 0x11;
39/// V1 transaction hash (legacy).
40pub const V1_TRANSACTION_HASH: u8 = 0x12;
41/// Signed command (V1).
42pub const SIGNED_COMMAND_V1: u8 = 0x13;
43/// User command memo.
44pub const USER_COMMAND_MEMO: u8 = 0x14;
45/// VRF truncated output.
46pub const VRF_TRUNCATED_OUTPUT: u8 = 0x15;
47/// Web pipe identifier.
48pub const WEB_PIPE: u8 = 0x16;
49/// Coinbase stack data.
50pub const COINBASE_STACK_DATA: u8 = 0x17;
51/// Coinbase stack hash.
52pub const COINBASE_STACK_HASH: u8 = 0x18;
53/// Pending coinbase hash builder.
54pub const PENDING_COINBASE_HASH_BUILDER: u8 = 0x19;
55/// zkApp command.
56pub const ZKAPP_COMMAND: u8 = 0x1a;
57/// Verification key.
58pub const VERIFICATION_KEY: u8 = 0x1b;
59/// Token identifier.
60pub const TOKEN_ID_KEY: u8 = 0x1c;
61/// Transaction hash (current version).
62pub const TRANSACTION_HASH: u8 = 0x1d;
63
64/// Ledger hash used for testing only.
65pub const LEDGER_TEST_HASH: u8 = 0x30;
66
67// Non-sequential version bytes. Existing user key infrastructure
68// depends on them -- do not change.
69
70/// Private key scalar.
71pub const SECRET_KEY: u8 = 0x5a;
72/// Schnorr signature.
73pub const SIGNATURE: u8 = 0x9a;
74/// Compressed non-zero curve point (public key / address).
75pub const NON_ZERO_CURVE_POINT_COMPRESSED: u8 = 0xcb;