1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
use SplDiscriminate;
pub const CONFIG: & = b"config";
pub const ISSUER: & = b"issuer";
pub const KYC_RECORD: & = b"kyc-record";
pub const MINT_CONFIG: & = b"mint-config";
/// Seed for the singleton pending platform-admin transfer proposal PDA.
pub const AUTHORITY_TRANSFER: & = b"authority-transfer";
/// Production timelock between proposing and accepting a new platform admin (48h).
pub const AUTHORITY_TRANSFER_DELAY_MAINNET_SECONDS: i64 = 172_800;
/// Test-cluster (Devnet/Testnet) timelock — short for fast E2E (60s).
///
/// Selected at runtime from the immutable on-chain `Config.cluster`, NOT a Cargo
/// feature, so the single cluster-agnostic SBF artifact is preserved.
pub const AUTHORITY_TRANSFER_DELAY_TEST_SECONDS: i64 = 60;
/// Binary UUID length stored in account data and PDA seeds.
pub const MAX_ISSUER_ID_LEN: usize = 16;
/// SPL / Token-2022 token account: owner pubkey offset after 32-byte mint.
/// This is a Token-2022 account (not a Steel account), so it has NO discriminator
/// prefix — the offset is relative to the raw account data directly.
pub const TOKEN_ACCOUNT_OWNER_OFFSET: usize = 32;
/// Max UTF-8 offering id bytes stored in accounts.
pub const MAX_OFFERING_ID_LEN: usize = 31;
/// Raw-data offset where a Steel account's struct body begins.
///
/// Steel allocates `8 + size_of::<T>()` bytes and writes the 1-byte discriminator
/// at `data[0]` (bytes `1..8` are padding), so the `#[repr(C)]` struct body starts
/// at raw byte offset 8. `Seed::AccountData { data_index, .. }` indexes the RAW
/// account data, so any offset used for extra-account-meta resolution must add this
/// prefix to the `offset_of!` (struct-relative) field offset.
pub const STEEL_ACCOUNT_DISCRIMINATOR_LEN: u8 = 8;
/// `MintConfig.issuer_id` raw-data offset for extra-account-meta resolution.
/// `STEEL_ACCOUNT_DISCRIMINATOR_LEN (8) + offset_of!(MintConfig, issuer_id) (32)`.
pub const MINT_CONFIG_ISSUER_ID_OFFSET: u8 = 40;
/// `MintConfig.offering_id` raw-data offset for extra-account-meta resolution.
/// `STEEL_ACCOUNT_DISCRIMINATOR_LEN (8) + offset_of!(MintConfig, offering_id) (48)`.
pub const MINT_CONFIG_OFFERING_ID_OFFSET: u8 = 56;