Skip to main content
The composite trust query (CTQ) response is the top-of-stack format above the four AlgoVoi receipt formats. A verifier walks an audit chain composed of compliance, settlement, cancellation, and refund receipts, applies a structured query, and emits a single composite-trust-claim response anchoring the chain by its content-addressed root. It is AlgoVoi-authored, specified in IETF Internet-Draft draft-hopley-x402-composite-trust-query (POSTED on IETF datatracker 2026-05-25, Independent Submission, Informational), and published as a standalone reference implementation:
  • Python: algovoi-composite-trust-query (live on PyPI, v0.1.1)
Both packages depend on algovoi-substrate / @algovoi/substrate for the JCS canonicalisation primitive. Apache 2.0.

Lifecycle position

Regulators, dashboards, and downstream agents consuming the CTQ response get a single byte-deterministic statement of the trust posture without re-walking the underlying chain. The chain remains independently verifiable at the response’s chain_ref content-address.

Why a four-state enumeration

Operationally distinct trust outcomes drive distinct operator actions. The format pins:
  • TRUSTED — proceed under the asserted trust posture.
  • PROVISIONAL — proceed cautiously; re-query after pending events finalise.
  • INSUFFICIENT_EVIDENCE — gather more evidence; do not proceed under TRUSTED.
  • UNTRUSTED — halt the action the query was framed to authorise.
A collapse to three values (e.g. TRUSTED / NOT_TRUSTED / PENDING) loses the operationally-distinct INSUFFICIENT_EVIDENCE state (“we could not verify either way”) from UNTRUSTED (“we verified and the answer is no”). The two trigger different operator actions: gather more evidence vs halt.

Response shape

A CTQ response is a seven-field JSON object canonicalised under RFC 8785 (JCS). Field names are sorted lexicographically by JCS during canonicalisation.

The closed enumeration: trust_outcome

Each value produces a byte-distinct content_hash.

Two content-addressed references

The response carries two sha256:{hex} references:
  • chain_ref points to the audit chain root. Resolving the chain itself is out-of-band (chain-by-content-address dereference, operator-side audit-log fetch, etc.). Consumers can independently walk the chain at chain_ref to verify the verifier’s conclusion.
  • query_ref points to the canonical bytes of the query that was answered. The query format is opaque to the response shape; callers may use JSON-LD, JSON Schema, SQL-like predicates, or any structured-question encoding. The reference is what binds the response to the specific question.
Both prefixes (sha256:) are part of the canonical bytes and MUST NOT be stripped.

Verifier-of-verifier composition

A CTQ response MAY itself be embedded as a row in a higher-level audit chain. A verifier-of-verifier reading the higher chain walks sequences of CTQ responses (a chain of verifier conclusions over chains of receipts) and emits a meta-CTQ response over the composite. This enables multi-party audit-chain composition: a regulator verifying an operator’s audit chain emits a CTQ response. A higher-level supervisor verifying multiple regulators’ CTQ responses emits a meta-CTQ response over those. Each level retains independent byte-deterministic verifiability.

Conformance vectors

8 byte-level reference vectors + 7 pair invariants + 3 chain invariants at vectors/composite_trust_query_v1/.

Quick start

TypeScript

What this is NOT

  • Not a receipt. Receipts record events that happened; a CTQ response records a verifier’s categorical conclusion over an event chain.
  • Not the query itself. The query is identified by query_ref (content-addressed); the query format is opaque to this response shape.
  • Not a chain-finality model. The verifier applies whatever finality semantics its risk model requires; the response records the categorical conclusion, not the evaluation discipline.

Companion IETF Internet-Draft

draft-hopley-x402-composite-trust-query (Independent Submission, Informational). AlgoVoi-authored. Normatively references draft-hopley-x402-canonicalisation-jcs-v1. Welcomes downstream-adopter contributions per the Appendix C “Known Adopters” pattern.

See also