ade_types
BLUE- Purpose
Owns the canonical Cardano domain vocabulary — primitives, era enum, address forms, era-tagged tx bodies/outputs/certificates, governance types — the lingua franca for every other crate.
CardanoEracarriesis_praos()+ALL. Owns the closed sumPrevHash = Genesis \| Block(Hash32). Owns the value-quantity domain splitmary::value::{OutputAssetQuantity(u64), MintBurnQuantity(i64)}(DC-LEDGER-VALUE-01). (Noade_typestype change sincecdcd9397— 84.)- Creates
CardanoEra(is_praos,ALL),SlotNo,BlockNo,EpochNo,Hash28,Hash32,Coin,Lovelace,NetworkId,Nonce,TxIn,RewardAccount,PoolId,Address,Credential,StakeCredential,Certificate,ConwayCert,DRep,GovAction,OperationalCert, per-era wrappers,ShelleyBlock/ShelleyHeader/VrfData/ProtocolVersion/PrevHash,mary::value::{OutputAssetQuantity, MintBurnQuantity, AssetName, MultiAsset, Value, PolicyId}. 84 public types.- Interprets
None — produce-only.
- MUST NOT
(1) Construct or decode
PreservedCbor. (2) Use any BLUE-forbidden pattern. (3) Depend on any workspace crate. (4) Add open/extensible variants to closed enums without a versioned gate (CardanoEraByron=0 … Conway=7;PrevHasha closed 2-variant sum). (5,DC-LEDGER-VALUE-01)OutputAssetQuantityMUST stay the non-negative Word64 output domain — non-negative by construction, only checkedchecked_add/checked_sub, type-incompatible with the signedMintBurnQuantity; it MUST NOT silently wrap, go negative, or be conflated with a mint/burn delta.- Inbound deps
Every other workspace crate.
- Outbound deps
None.
- Entry points
ade_types::CardanoEra(incl.is_praos,ALL),ade_types::{Hash32, Hash28, SlotNo, BlockNo, EpochNo, Nonce},ade_types::tx::{Coin, TxIn, PoolId},ade_types::shelley::cert::StakeCredential,ade_types::conway::*,ade_types::shelley::block::{OperationalCert, ProtocolVersion, ShelleyHeader, ShelleyBlock, VrfData, PrevHash},ade_types::mary::value::{OutputAssetQuantity, MintBurnQuantity, MultiAsset, Value}.- Key modules
primitives.rs,era.rs,tx.rs,address/,byron/,shelley/,allegra/,mary/(incl.value.rs),alonzo/,babbage/,conway/.
Depends on
—
Depended on by
—
CI guards — 6
| Script | Enforces |
|---|---|
| ci_check_conway_cert_classification_closed.sh | DC-TXV-06 |
| ci_check_credential_discriminant_closed.sh |
|
| ci_check_forbidden_patterns.sh | DC-LEDGER-08, T-CORE-01, T-CORE-02, T-DET-01 |
| ci_check_prevhash_single_wire_authority.sh | CN-WIRE-09 |
| ci_check_proposal_procedures_closed.sh | DC-LEDGER-11 |
| ci_check_value_quantity_domain.sh | DC-LEDGER-VALUE-01 |
Related invariants — 6
| ID | Status | Statement |
|---|---|---|
| CN-WIRE-09 | enforced | The Shelley-and-later header_body `prev_hash` field is the closed wire grammar `$hash32 / null` (cardano-ledger PrevHash = GenesisHash | BlockHash). A… |
| DC-LEDGER-08 | enforced | Conway cert-state accumulation is a closed, total, era-versioned transition: for each block at track_utxo, certificates decode through the era-correct… |
| DC-LEDGER-10 | enforced | Credential identity is faithful end-to-end: a stake/committee/DRep credential is a closed sum over {KeyHash, ScriptHash} of a 28-byte hash, never a ta… |
| DC-LEDGER-11 | enforced | proposal_procedures MUST NOT remain an opaque byte field in the authoritative Conway tx-body shape. ConwayTxBody.proposal_procedures is Option<Vec<Pro… |
| DC-LEDGER-VALUE-01 | enforced | Ade's authoritative UTxO OUTPUT asset quantity preserves the full non-negative Cardano Word64 domain (0 ..= 2^64-1) via the `OutputAssetQuantity(u64)`… |
| DC-TXV-06 | enforced | For each era, the certificate-deposit classification map(state, cert) is a closed, total, era-versioned function: every certificate variant resolves t… |