Expand description
Dependency-light semantic contracts for dual-attested resources (#1067).
This crate deliberately exposes no Serde implementation and no wire codec. #1065 exclusively owns canonical DAG-CBOR/CDDL. Values entering a trust boundary must pass the validating constructors in this crate; public struct layout is not a persistence or interoperability format.
Structs§
- Accepted
Authority - An accepted-current authority root supplied by the authority-specific
verifier. A DID or a
KeyPurposelabel is not an authority root. - Canonical
Resource Intent - A canonical intent can only be created after canonical decoding and digest verification. Its fields are intentionally private.
- Cid
- Content
Label Commitment - Did
- Dual
Attestation - Joined attestations can only be constructed after both signatures have been verified under their own accepted-current roots, the roots pass deployment separation policy, and all cross-claim/accounting checks pass.
- Fencing
Token - Registrar term is monotonically increasing across leadership/authority
epochs (the #1069-owned backend term-allocation rule); generation is
monotonically increasing per resource inside a term. The compare-and-apply
contract orders numeric
(registrar_term, generation, resource_version)tuples. - Finalization
Statement - Signed registrar statement. It is untrusted until accepted by
FinalizedResource::verifyand a configured accepted-current verifier. - Finalized
Resource - Verified registrar output. Private fields prevent fabrication by namespace, storage, PDS, or recovery callers.
- Intent
Candidate - Untrusted wire/persistence candidate presented to the validating boundary.
- Intent
Claims - Semantic claims returned by the trusted #1065 canonical decoder.
- Intent
Digest - Ledger
Attestation Candidate - Digest-only economic statement. This is private registrar/evidence material, never the ordinary namespace/public-PDS projection.
- MacAttestation
Candidate - Digest-only MAC statement; richer claim data is re-derived from canonical bytes.
- Operation
Capability Commitment - A blinded anonymous capability value bound to exactly one intent digest.
- Operation
Entitlement Commitment - A one-use anonymous entitlement/nullifier bound to exactly one intent.
- Operation
Id - Owner
Commitment - A stable, private ownership commitment. It is deliberately not assignable to anonymous capability, entitlement, label, or public-evidence fields.
- Predecessor
Ref - Private
Evidence Commitment - Projection
Effect - Ordered desired-state effect. Publishers compare
(registrar_term, generation, resource_version)and reject stale or conflicting effects. - Projection
Entry Id - Public
Evidence Commitment - The only evidence commitment permitted in a public projection. Its digest binding prevents copying a holder/entitlement value across redemptions.
- Public
Resource Projection - Privacy-minimized namespace/public-PDS projection. It contains no detailed attestation CID, payer, issuer, unit, amount, transfer ID, capability root, or signing-key coordinates.
- Registration
Snapshot - Registrar snapshot of one operation. Fields are private: construction goes
through
RegistrationSnapshot::new, which rejects terminal states without exactly one matching resolution and nonterminal states carrying one, so an inconsistent state/resolution pair is unrepresentable. - Reject
Shared Attester - The baseline policy used by the canonical profile rejects a shared
authority root or signer DID. It deliberately does not compare
key_id: that value can be a local fragment (for example,#resource-v1) scoped by its authority namespace, and equal fragments do not prove shared key material. A deployment that needs cross-namespace key-material detection must supply an independence policy with a globally scoped verifier-derived key identity or fingerprint. - Resolution
Ref - Resolution
Target - Immutable identity of the operation whose terminal outcome is recorded. Every resolution variant carries it; no terminal accounting outcome can be attached to a different operation/resource/fence.
- Resource
Id - Signature
- Signature
Envelope - Signer selection and historical-verification coordinates authenticated by
the envelope.
(signer, key_id, key_epoch)resolves through retained accepted-current evidence;state_epochis not a substitute for key epoch. - Transfer
Id - Verified
Evidence - Result material returned by a trusted attestation verifier. The verifier is the cryptographic/accepted-current boundary; this crate then seals it into a non-public verified evidence value.
- Verified
Ledger Attestation - Verified
MacAttestation - Verified evidence is minted only by
verify_and_join; raw candidates do not satisfy the registrar interface. - Withdrawal
Target
Enums§
- Assurance
- Mirrors the canonical
hyprstream_rpc::auth::mac::Assurancediscriminants. It has no serialization contract. #1065 MUST use checked conversion and byte-compatibility vectors against the canonical owner. - Authority
Error - Capability
Binding - Anonymous profiles use a blinded, operation-scoped value that is not holder-stable or cross-operation-linkable.
- Conflict
Accounting Resolution - The losing side’s accounting disposition in a
Resolution::RejectedConflictrecord. The referenced transfer MUST be durably confirmed by the economic authority before the terminal resolution is committed, so an identical retry or recovery query discovers the exact economic outcome. - Contract
Error - Contract
Version - Current semantic-contract version. Wire format versions remain #1065-owned.
- Controller
Ref - Digest
Suite - Digest suite for
ResourceIntentcanonical bytes. - Intent
Format Version - Canonical intent format understood by a configured #1065 codec.
- KeyPurpose
- Ledger
Phase - Ownership
Ref - Payer
Ref - Projection
Action - Quarantine
Reason - Registrar
State - Required
Assurance - The minimum assurance a canonical intent is permitted to require. Unlike
Assurance, this type intentionally has noUnverifiedvariant: an intent cannot make unverified evidence sufficient by selecting a zero floor. - Resolution
- Immutable terminal resolution.
ManualReviewandQuarantinedare never terminal until one of these records is durably committed. A record that references an accounting effect (Voided,Compensated, or the losing side’s disposition inRejectedConflict) is committed only after the referenced transfer is durably confirmed. - Resource
Kind - Resource
Operation - Closed operation vocabulary. Namespace link/rename/bind operations use #1071’s separate child-owned vocabulary and will never be added here without a semantic-contract version increase.
- Signature
Suite - Signature profile reference; this is semantic metadata, not wire encoding.
Traits§
- Attestation
Independence Policy - Deployment policy for the separation of the two signing authorities. Default deployments reject a shared accepted root or signer. Service or host co-location is not itself evidence of independence: if it lets one compromise control both roots/keys, this policy must reject the deployment or the deployment has explicitly accepted that residual risk outside this contract.
- Economic
Authority - Finalization
Proof Verifier - Intent
Validator - Trusted codec boundary implemented by #1065.
- Ledger
Attestation Verifier - MacAttestation
Verifier - MacAuthority
- Resource
Materializer - Resource
Publisher - Resource
Registrar