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-DraftDocumentation Index
Fetch the complete documentation index at: https://docs.algovoi.co.uk/llms.txt
Use this file to discover all available pages before exploring further.
draft-hopley-x402-composite-trust-query (POSTED on IETF datatracker 2026-05-25, Independent Submission, Informational), and published as a standalone reference implementation:
- TypeScript:
@algovoi/composite-trust-query(live, v0.1.0) - Python:
algovoi-composite-trust-query(PyPI publish pending rate-limit clearance; npm package live)
algovoi-substrate / @algovoi/substrate for the JCS canonicalisation primitive. Apache 2.0.
Lifecycle position
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.
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.| Field | Type | Description |
|---|---|---|
canon_version | string | In-band canonicalisation pin. Fixed jcs-rfc8785-v1. |
chain_ref | string | sha256:{hex} reference to the audit chain root. |
ctq_timestamp_ms | integer | Epoch ms when verifier emitted the response. Substrate Rule 2. |
jurisdiction_flags | ordered array | ISO-3166-1 codes. Order significant under RFC 8785. |
query_ref | string | sha256:{hex} reference to the canonical bytes of the query that was answered. |
trust_outcome | string (closed enum) | TRUSTED / PROVISIONAL / INSUFFICIENT_EVIDENCE / UNTRUSTED. |
verifier_did | string | DID URI of the verifier. |
The closed enumeration: trust_outcome
| Value | Semantic | Operator action |
|---|---|---|
TRUSTED | Verified chain answers the query affirmatively. All anchored receipts valid, present, and consistent. | Proceed under asserted trust posture. |
PROVISIONAL | Chain partially complete; some receipts in PENDING_FINALITY or analogous non-terminal state. | Proceed cautiously; re-query after pending events finalise. |
INSUFFICIENT_EVIDENCE | Chain does not contain enough evidence to answer the query. | Gather more evidence; do not proceed under TRUSTED. |
UNTRUSTED | Chain contains evidence that negates the query. | Halt the action the query was framed to authorise. |
content_hash.
Two content-addressed references
The response carries twosha256:{hex} references:
chain_refpoints 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 atchain_refto verify the verifier’s conclusion.query_refpoints 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.
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 atvectors/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
- Canonicalisation substrate — the JCS discipline
- Compliance receipt — admission events
- Settlement attestation — per-execution settlements
- Cancellation receipt — mandate terminations
- Refund receipt — post-settlement refunds
- Conformance vectors — full vector corpus
- Substrate authorship and provenance — citable AlgoVoi authorship record