retention_chain_ref - a single hash computed from four fields the receipt already contains - that lets any party independently verify chain integrity with no network access and no AlgoVoi infrastructure.
Specified in IETF Internet-Draft draft-hopley-x402-retention-chain-05, sole AlgoVoi authorship. Cross-validated byte-for-byte across 8 implementations in 8 programming languages.
Apache-2.0 open source. Install via
pip install algovoi-retention-chain. Conformance vectors are published at chopmob-cloud/algovoi-jcs-conformance-vectors. Adopters who pin and verify against the canonical vectors qualify for a free v0 licence key for the mandate auditor - see Adopters below.How it works
The chain reference is computed as:chain_seq, issuer_id, prev_receipt_hash, receipt_hash.
The genesis receipt has chain_seq = 0 and prev_receipt_hash = "". Every subsequent receipt increments chain_seq by 1 and sets prev_receipt_hash to the receipt_hash of the receipt immediately before it - not the previous chain ref, the previous receipt hash. This means an auditor with any subset of receipts can recompute and verify each link independently.
What an auditor can verify
No issuer call. No registry lookup. No AlgoVoi service. SHA-256 and a JSON parser is the entire dependency.
Regulatory mapping
Cross-language conformance
The algorithm is specified at the byte level in the I-D and cross-validated across 8 independent implementations. Every implementation must produce identicalretention_chain_ref values for the same inputs.
Conformance vectors are published at chopmob-cloud/algovoi-jcs-conformance-vectors. An implementer in any language can verify against the canonical test cases independently.
Conformance vectors
Two published vector sets, both cross-validated 8-impl:retention_chain_v0 - 3 vectors. Genesis + 2 chain links, single issuer (algovoi:test).
retention_chain_v1 - 14 vectors in three invariant classes:
- Part A - 6-link extended chain (seq 0-5,
issuer_id=algovoi:compliance) - Part B - multi-issuer isolation: same receipt, different
issuer_id→ differentchain_ref - Part C - seq-gap adversarial pair: correct vs tampered
prev_receipt_hash→ differentchain_ref
Adopters
If you build onalgovoi-retention-chain and verify against the canonical vectors, you qualify for a free v0 licence key for algovoi-mandate-auditor - AlgoVoi’s production-grade MiCA/DORA compliance audit service for payment mandate charge chains.
Qualification criteria:
algovoi-retention-chaindeclared as a dependency, pinned to a specific version (==0.1.0)- At least one canonical vector hash from
retention_chain_v0orretention_chain_v1in your conformance tests - A
NOTICEfile preserving the Apache-2.0 attribution
NOTICE file. If all criteria are met, a v0 key is issued within one business day.
verify_audit_report is always free with no key required.
Relationship to the open substrate
The Retention Chain Substrate sits directly on top of the open JCS Canonicalisation Substrate. It uses the same RFC 8785 JCS canonicalization and SHA-256 primitives that the open substrate defines - no additional cryptographic dependencies.retention_chain_ref field in your receipts.
Specification
The normative specification is IETF Internet-Draftdraft-hopley-x402-retention-chain-05 (AlgoVoi, sole authorship, 19 June 2026). The I-D defines:
- The exact preimage schema and field constraints
- The JCS canonicalization requirement (RFC 8785 normative reference)
- Chain construction rules (genesis condition, link ordering)
- Single-link and sequence verification procedures
- Conformance vectors with exact canonical byte sequences
- The Payment Action Lifecycle: action_ref, per-state transition_hash, and the exactly-once SKIP-on-retry guarantee (Section 7)
- The Settlement-Action Binding: binding_ref tying a settled payment to the verified action and its retention-chain entry (Section 7.6)
- Policy Binding: policy_ref / policy_bound_ref binding a policy snapshot to a frozen subject ref, for version-provable, rotation-detectable records (Section 7.7), with conformance vectors (Section 8.10)
- Compliance Gate Binding: payer_ref / gate_ref binding a no-PII payer reference and an ALLOW/REFER/DENY verdict to a pinned subject ref, so a screening decision is tied to the policy in force (Section 7.8), with conformance vectors (Section 8.11)
- Regulatory applicability analysis (MiCA Art. 80, DORA Art. 14, AMLR Art. 56)
- Security considerations (collision resistance, subset auditability, truncation, issuer isolation)