Expand description
Sealing the mint: issuance requires an unforgeable, key-bound capability.
Issuance is the only operation that grows a unit’s supply (INV-1), so “who may call this” is a monetary question rather than an access-control convenience.
§What the seal is, and what defeated the previous attempt
An earlier revision gated credit on a MintCapability with a private
field, but obtained that capability through an injectable MintVerifier
trait plus a public with_mint_verifier setter. That is not a seal: a
downstream crate could implement the trait as fn verify(..) { Ok(()) },
install it on an existing backend, and mint arbitrary amounts from
meaningless bytes. Making the capability unforgeable is pointless if the
authority that mints capabilities is publicly replaceable.
So there is no trait and no setter. Verification is a concrete in-crate function over concrete key material:
MintAuthorityholds verifying keys, not behaviour. There is no downstream-implementable extension point to swap the check forOk(()).- The authority is supplied once, at backend construction, and is
immutable thereafter. Holding a
&mutbackend does not let you change what it will accept. MintCapabilityhas no public constructor. The only route isLedgerBackend::authorize_mint, which verifies a hybrid-PQC composite signature over the canonical, domain-separated encoding of that exact transfer against the authority the backend was built with.
The residual power a downstream crate has is to stand up its own ledger with its own keys, which is not an escalation — it mints only into its own database, against a supply it already owns. What it cannot do is mint against a ledger whose authority’s signing key it does not hold.
§Why hybrid-PQC, concretely and not behind a seam
Minted issuance authorizations are exactly the artifact class that must be
EdDSA + ML-DSA-65 composite rather than classical-only. hyprstream-crypto
is an unconditional, WASM-safe dependency of this crate (the same one
verify_checkpoint_signature already uses), so the real verifier lives
here. Nothing needs to be injected from outside, which is precisely what
removes the injection point.
A backend built with no authority cannot mint at all — the fail-closed direction. An operator who has not wired an issuance authority gets a mint-disabled ledger, never a mint-open one.
Structs§
- Mint
Authority - The key material a ledger checks issuance authorizations against.
- Mint
Capability - Proof that a specific issuance was authorized by the ledger’s mint authority.
Functions§
- mint_
signing_ input - The canonical, domain-separated bytes an issuance authorization signs.