Expand description
DIG Network Constants
Defines network parameters for the DIG L2 blockchain. This crate exists separately so that any DIG crate can import network constants without pulling in the full CLVM engine or other heavy dependencies.
The core type is NetworkConstants, which wraps chia-consensus’s
ConsensusConstants with DIG-specific values (genesis challenge,
AGG_SIG additional data, cost limits, etc.).
§Chia L1 vs DIG L2 (do not mix)
DIG_MAINNET / DIG_TESTNET describe the DIG L2 network. Separately,
CHIA_L1_MAINNET_AGG_SIG_ME / CHIA_L1_TESTNET11_AGG_SIG_ME hold the
Chia L1 (foreign chain) genesis challenge that DIG wallet code needs as
AGG_SIG_ME additional data when signing L1 spends. They live here as the
ecosystem’s single source of truth, but are DELIBERATELY distinct from the DIG
L2 genesis — signing an L1 spend with the DIG L2 genesis produces an invalid
signature. The CHIA_L1_ prefix is the anti-mixup guard.
§Usage
use dig_constants::DIG_MAINNET;
let genesis = DIG_MAINNET.genesis_challenge();
let consensus = DIG_MAINNET.consensus();Structs§
- Network
Constants - DIG network constants.
Constants§
- CHIA_
L1_ MAINNET_ AGG_ SIG_ ME - Chia L1 mainnet genesis challenge, used as AGG_SIG_ME additional data.
- CHIA_
L1_ TESTNE T11_ AGG_ SIG_ ME - Chia L1 testnet11 genesis challenge, used as AGG_SIG_ME additional data.
- DEK_
SALT - HKDF salt for the per-profile DEK derivation.
- DIG_
ASSET_ ID - Canonical $DIG CAT asset id (TAIL hash) on Chia mainnet.
- DIG_
LOCAL_ HOST - The mDNS/local hostname the installed DIG node registers.
- DIG_
MAINNET - DIG mainnet constants.
- DIG_
NODE_ PORT - The default localhost port a client uses to reach the local DIG node.
- DIG_
RELAY_ URL - Canonical DIG NAT-traversal relay endpoint.
- DIG_
TESTNET - DIG testnet constants.
- DIG_
TREASURY_ ADDRESS - Canonical DIG treasury address (bech32m form of
DIG_TREASURY_INNER_PUZZLE_HASH). - DIG_
TREASURY_ INNER_ PUZZLE_ HASH - Canonical DIG treasury inner (standard) puzzle hash.
- IDENTITY_
IKM_ VERSION - Version byte prefixed to the 32-byte identity scalar to form the DEK’s HKDF
input key material (
IDENTITY_IKM_VERSION || identity_scalar_32). - PROFILE_
DEK_ LABEL - HKDF info/label for the per-profile DEK derivation.
- PROFILE_
SEALING_ X25519_ LABEL - HKDF info/label for deriving a profile’s per-profile X25519 sealing
keypair — the key the DIG App uses to seal/unseal
DIGCHAT1messages. - RPC_
DIG_ NET_ URL - The public DIG read gateway.
- SYMMETRIC_
KEY_ LEN - Output length, in bytes, of the derived per-profile DEK (HKDF-SHA256’s natural output for a symmetric AEAD key).