<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc version="3" ipr="trust200902" docName="draft-hopley-x402-composite-trust-query-01" submissionType="IETF" category="info" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" indexInclude="true">

<front>
<title abbrev="x402-composite-trust-query">Composite Trust Query Response Format for Agentic-Payment Audit Chains</title><seriesInfo value="draft-hopley-x402-composite-trust-query-01" stream="IETF" status="informational" name="Internet-Draft"></seriesInfo>
<author initials="C." surname="Hopley" fullname="Christopher Hopley"><organization>AlgoVoi</organization><address><postal><street></street>
</postal><email>chopmob@gmail.com</email>
</address></author><date year="2026" month="May" day="30"></date>
<area>Independent Submission</area>
<workgroup>Independent Submission</workgroup>
<keyword>x402</keyword>
<keyword>agentic payments</keyword>
<keyword>trust</keyword>
<keyword>verifier</keyword>
<keyword>audit chain</keyword>
<keyword>JCS</keyword>
<keyword>RFC 8785</keyword>
<keyword>categorical receipt</keyword>
<keyword>composite trust query</keyword>
<keyword>MiCA</keyword>
<keyword>PSD2</keyword>

<abstract>
<t>This document specifies a composite trust query response format for
agentic-payment audit chains. The format records a verifier's
categorical conclusion over an audit chain composed of compliance,
settlement, cancellation, and refund receipts, in response to a
stated query.</t>
<t>The response format uses a closed four-element enumeration of
categorical outcomes (TRUSTED, PROVISIONAL, INSUFFICIENT_EVIDENCE,
UNTRUSTED). The four-state enumeration captures the
operationally-distinct decision space: proceed,
proceed-with-caution, hold-pending-more-data, halt. Collapsing to
three values loses the distinction between INSUFFICIENT_EVIDENCE
(&quot;we could not verify either way&quot;) and UNTRUSTED (&quot;we verified and
the answer is no&quot;), which matters for operator dashboards,
regulator reporting, and downstream automated decision-making.</t>
<t>The format is verifier-emitted and audit-chain-anchored. A verifier
walks an audit chain composed of compliance receipts
(draft-hopley-x402-compliance-receipt), settlement attestations
(draft-hopley-x402-settlement-attestation), cancellation receipts
(draft-hopley-x402-cancellation-receipt), and refund receipts
(draft-hopley-x402-refund-receipt), applies a structured query
identified by content-addressed reference, and emits a single
composite-trust-claim response anchoring the chain by its
content-addressed root.</t>
<t>The format composes above the four receipt formats under the same
canonicalisation discipline (draft-hopley-x402-canonicalisation-jcs).
Regulators, dashboards, and downstream agents consuming the 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 <tt>chain_ref</tt>
content-address.</t>
</abstract>

</front>
<middle>
<section anchor="sect-1-introduction"><name>Introduction</name>

<section anchor="sect-1-1-motivation"><name>Motivation</name>
<t>Agentic-payment flows generate audit chains composed of multiple
categorical receipt classes: admission (compliance receipt), each
recurring execution (settlement attestation), termination
(cancellation receipt), and refund (refund receipt where owed).
Consumers of these chains include regulators auditing operator
behaviour, dashboards rendering operator state, parent agents
managing fleets of child tasks, and downstream automation deciding
whether to proceed with onward actions.</t>
<t>These consumers typically do not want to walk the underlying chain
themselves. They want a verified categorical answer to a structured
question: &quot;is this payment cleared for settlement under jurisdiction
X?&quot;, &quot;is this mandate currently active?&quot;, &quot;is this chain free of
compliance-forced terminations?&quot;, &quot;is this refund obligation
satisfied?&quot;. The chain itself is the evidence; the answer is the
consumable.</t>
<t>This document specifies a verifier-side response format that
records:</t>

<ul spacing="compact">
<li>The categorical conclusion the verifier reached
(TRUSTED / PROVISIONAL / INSUFFICIENT_EVIDENCE / UNTRUSTED).</li>
<li>The audit chain that was queried, referenced by content-addressed
root (<tt>chain_ref</tt>).</li>
<li>The query that was answered, referenced by content-addressed bytes
(<tt>query_ref</tt>).</li>
<li>The verifier identity (<tt>verifier_did</tt>).</li>
<li>The timestamp of the response (<tt>ctq_timestamp_ms</tt>).</li>
<li>The jurisdiction(s) under which the conclusion was reached
(<tt>jurisdiction_flags</tt>).</li>
</ul>
<t>The four-state enumeration is load-bearing under existing
regulatory frameworks:</t>

<ul spacing="compact">
<li>Under MiCA (Regulation (EU) 2023/1114) Article 80 record-keeping,
retained verifier conclusions over settlement audit chains are
themselves evidence. The distinction between PROVISIONAL (settled
but not yet finalised) and INSUFFICIENT_EVIDENCE (verifier could
not reach a conclusion) is operationally material.</li>
<li>Under PSD2 (Directive 2015/2366), refund-window decisions are
triggered by settlement state plus elapsed time. A consumer
reading a CTQ response over a refund-eligible chain needs to
distinguish UNTRUSTED (&quot;settled-then-reversed, no refund obligation
attaches in this direction&quot;) from PROVISIONAL (&quot;not yet final,
re-query later&quot;) from INSUFFICIENT_EVIDENCE (&quot;chain has gaps,
cannot conclude&quot;).</li>
<li>Under AML Directives 5 and 6, audit-chain verification by
independent parties is itself a regulatory function. The
verifier's conclusion is the evidence the regulator retains.</li>
</ul>
<t>A receipt format that collapses these distinctions loses the
load-bearing operational separation between &quot;the answer is no&quot; and
&quot;we cannot conclude.&quot;</t>
</section>

<section anchor="sect-1-2-scope"><name>Scope</name>
<t>This document specifies:</t>

<ul spacing="compact">
<li>The canonical JSON shape of the composite trust query response
(Section 3).</li>
<li>The reference to the canonicalisation rule applicable to the
response (Section 4 -- normative reference to
draft-hopley-x402-canonicalisation-jcs, not redefined inline).</li>
<li>The audit chain composition pattern under which CTQ responses
compose with the four AlgoVoi-authored receipt formats and may
themselves participate in higher-level audit chains (Section 5).</li>
<li>The year-N auditability properties the format pins (Section 6).</li>
<li>Worked examples covering all four trust_outcome outcomes
(Appendix A).</li>
</ul>
<t>This document does NOT specify:</t>

<ul spacing="compact">
<li>The query format. The query is identified by <tt>query_ref</tt>
(content-addressed); the query encoding is opaque to this response
format. Callers MAY use JSON-LD, JSON Schema, SQL-like predicates,
or any other structured-question encoding. The query's canonical
bytes are addressed by SHA-256 and referenced via <tt>sha256:&lt;hex&gt;</tt>.</li>
<li>The verifier's risk model or finality semantics. The verifier
applies whatever evidence-evaluation discipline its risk model
requires; the response records the categorical conclusion, not
the evaluation discipline.</li>
<li>The transport protocol for delivering CTQ responses. The format
is shape-only; transport (HTTPS, agent-to-agent messaging,
on-chain anchoring, file artifact) is out of scope.</li>
</ul>
</section>

<section anchor="sect-1-3-relationship-to-other-internet-drafts"><name>Relationship to other Internet-Drafts</name>
<t>This document normatively references:</t>

<ul spacing="compact">
<li>draft-hopley-x402-canonicalisation-jcs -- the JCS canonicalisation
discipline pinned in Section 4.</li>
</ul>
<t>This document is complementary to:</t>

<ul spacing="compact">
<li>draft-hopley-x402-compliance-receipt -- admission-time compliance
screening receipts. A CTQ response's <tt>chain_ref</tt> MAY anchor a
chain that includes a compliance receipt at its root.</li>
<li>draft-hopley-x402-settlement-attestation -- per-execution
settlement attestations.</li>
<li>draft-hopley-x402-cancellation-receipt -- mandate-termination
receipts.</li>
<li>draft-hopley-x402-refund-receipt -- post-settlement refund
receipts.</li>
</ul>
<t>A CTQ response sits above all four receipt classes. The verifier
reads the chain composed of them and emits a single categorical
response. The chain remains independently verifiable at the
<tt>chain_ref</tt> content-address.</t>
</section>
</section>

<section anchor="sect-2-conventions-and-definitions"><name>Conventions and Definitions</name>

<section anchor="sect-2-1-notation"><name>Notation</name>
<t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;,
&quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;NOT RECOMMENDED&quot;, &quot;MAY&quot;, and
&quot;OPTIONAL&quot; in this document are to be interpreted as described in
BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.</t>
</section>

<section anchor="sect-2-2-definitions"><name>Definitions</name>
<t><strong>composite trust query response (CTQ response)</strong>: a JSON object of
the shape specified in Section 3, canonicalised under the discipline
of draft-hopley-x402-canonicalisation-jcs, emitted by a verifier
recording a categorical conclusion over an audit chain in response
to a stated query.</t>
<t><strong>content_hash</strong>: SHA-256, lowercase hex, of the JCS-canonical bytes
of the CTQ response object.</t>
<t><strong>chain_ref</strong>: a string of the form <tt>sha256:&lt;lowercase-hex-64&gt;</tt>
identifying the root of the audit chain the verifier walked, by
content hash of the chain's root record (typically a chain row
record per draft-hopley-x402-compliance-receipt Section 5.1, or an
equivalent root-anchor record under the operator's audit-chain
format).</t>
<t><strong>query_ref</strong>: a string of the form <tt>sha256:&lt;lowercase-hex-64&gt;</tt>
identifying the canonical bytes of the query that was answered. The
query encoding is out of scope for this document; the reference is
opaque.</t>
<t><strong>verifier_did</strong>: a string-valued DID URI identifying the verifier
that emitted the response.</t>
<t><strong>trust_outcome</strong>: a string-valued field carrying one of four closed
enumeration values. See Section 3.1.</t>
<t><strong>canon_version</strong>: an in-band string identifying the canonicalisation
discipline. Fixed value <tt>jcs-rfc8785-v1</tt> for this version.</t>
</section>
</section>

<section anchor="sect-3-response-format-specification"><name>Response Format Specification</name>
<t>A CTQ response is a JSON object with the following seven fields.
All fields are REQUIRED. The response is canonicalised under
draft-hopley-x402-canonicalisation-jcs per Section 4. Field names
are sorted lexicographically by JCS during canonicalisation; the
object itself uses arbitrary authoring order.</t>

<section anchor="sect-3-1-trust-outcome"><name>trust_outcome</name>
<t>A string-valued field. The value MUST be one of:</t>

<ul spacing="compact">
<li><tt>TRUSTED</tt> -- the verified chain answers the query affirmatively.
All anchored receipts are valid, present, and consistent. No
revocation, reversal, or compliance-forced termination on the
chain.</li>
<li><tt>PROVISIONAL</tt> -- the chain is partially complete; some receipts
are in PENDING_FINALITY or analogous non-terminal state. The
verifier can affirm partial state but not full settlement.</li>
<li><tt>INSUFFICIENT_EVIDENCE</tt> -- the chain does not contain enough
evidence to answer the query. Chain segments are missing, the
query references state outside the chain, or content-addressed
pointers cannot be dereferenced.</li>
<li><tt>UNTRUSTED</tt> -- the chain contains evidence that negates the
query. Compliance-forced termination, settled-then-reversed
transaction, REJECTED refund, expired-without-renewal mandate.</li>
</ul>
<t>The four-element enumeration is closed. Implementations MUST reject
any other value at validation time before canonicalisation.
Free-form &quot;reason&quot; strings, score-based representations, or
operator-internal classification labels are not acceptable
substitutes for the categorical outcome.</t>
<t>The four-value enumeration captures a genuinely four-state decision
space: proceed (TRUSTED), proceed-with-caution (PROVISIONAL),
hold-pending-more-data (INSUFFICIENT_EVIDENCE), and halt
(UNTRUSTED). Collapsing to three values loses the
operationally-distinct INSUFFICIENT_EVIDENCE state. This matters
because INSUFFICIENT_EVIDENCE drives a different operator action
(gather more evidence) than UNTRUSTED (halt the framed action).</t>
</section>

<section anchor="sect-3-2-chain-ref"><name>chain_ref</name>
<t>A string-valued field of the form <tt>sha256:&lt;lowercase-hex-64&gt;</tt>. The
hex digest is SHA-256 of the JCS-canonical bytes of the audit chain
root the verifier walked.</t>
<t>The &quot;audit chain root&quot; is the operator-defined anchor record at the
top of the chain (typically the row 1 record of a hash-chained
audit-row sequence per draft-hopley-x402-compliance-receipt Section
5.1). The CTQ response references the root, not individual chain
rows or receipts within the chain; resolution of the chain itself is
out-of-band (chain-by-content-address dereference, operator-side
audit-log fetch, etc.).</t>
<t>Implementations MUST NOT strip the <tt>sha256:</tt> prefix during
canonicalisation or verification.</t>
</section>

<section anchor="sect-3-3-query-ref"><name>query_ref</name>
<t>A string-valued field of the form <tt>sha256:&lt;lowercase-hex-64&gt;</tt>. The
hex digest is SHA-256 of the canonical bytes of the query that was
answered.</t>
<t>The query encoding is opaque to this response format. Callers MAY
use any structured-question encoding (JSON-LD, JSON Schema,
SQL-like predicate, operator-internal DSL, etc.). The canonical
bytes of the query are addressed by SHA-256 and referenced here;
resolving the query bytes is out-of-band.</t>
<t>Implementations MUST NOT strip the <tt>sha256:</tt> prefix during
canonicalisation or verification.</t>
</section>

<section anchor="sect-3-4-ctq-timestamp-ms"><name>ctq_timestamp_ms</name>
<t>An integer-valued field carrying the epoch-millisecond timestamp at
which the verifier emitted the response, in UTC.</t>
<t>This field MUST be an integer. RFC 3339 string forms (e.g.
<tt>&quot;2026-05-30T12:00:00Z&quot;</tt>) MUST be rejected at the validation layer
before canonicalisation. This is Substrate Rule 2, normatively
specified in draft-hopley-x402-canonicalisation-jcs Section 4.1.</t>
</section>

<section anchor="sect-3-5-jurisdiction-flags"><name>jurisdiction_flags</name>
<t>An ordered array of string-valued ISO-3166-1 alpha-2 country codes
or alpha-3 region codes identifying the applicable regulatory
frameworks under which the response was reached.</t>
<t>Authoring convention: primary jurisdiction first (where the
verifier is licensed or operates), secondary jurisdictions in order
of regulatory precedence.</t>
<t>Array element ORDER is SIGNIFICANT and load-bearing per
draft-hopley-x402-canonicalisation-jcs Section 4.3.</t>
</section>

<section anchor="sect-3-6-verifier-did"><name>verifier_did</name>
<t>A string-valued DID URI identifying the verifier emitting the
response. Whether the verifier's DID is registered in any particular
DID method registry is out of scope; the field is treated as opaque
identifier-bytes under JCS canonicalisation.</t>
</section>

<section anchor="sect-3-7-canon-version"><name>canon_version</name>
<t>A string-valued in-band canonicalisation rule pin. For this version
of the response format the value MUST be <tt>jcs-rfc8785-v1</tt>.</t>
</section>
</section>

<section anchor="sect-4-canonicalisation"><name>Canonicalisation</name>
<t>The CTQ response MUST be canonicalised under the discipline pinned
by draft-hopley-x402-canonicalisation-jcs and identified by the URN:</t>

<artwork><![CDATA[urn:x402:canonicalisation:jcs-rfc8785-v1
]]></artwork>
<t>The full normative specification of the discipline (JCS RFC 8785
plus the schema-normalisation requirements including Substrate
Rule 2) is in that document. This document does not redefine the
discipline inline.</t>
</section>

<section anchor="sect-5-audit-chain-composition"><name>Audit Chain Composition</name>

<section anchor="sect-5-1-ctq-response-as-chain-consumer"><name>CTQ Response as Chain Consumer</name>
<t>A CTQ response is typically emitted in response to a query over an
existing audit chain. The chain is composed of records under the
four AlgoVoi-authored receipt formats. The CTQ response's
<tt>chain_ref</tt> is the SHA-256 of the row 1 record's JCS-canonical
bytes. A consumer reading the CTQ response trusts the verifier's
categorical conclusion and may optionally walk the underlying chain
themselves at the same content-address to verify.</t>
</section>

<section anchor="sect-5-2-ctq-response-as-chain-row"><name>CTQ Response as Chain Row</name>
<t>A CTQ response MAY ALSO be embedded as a row in a higher-level
audit chain. The chain row shape is identical to that specified in
draft-hopley-x402-compliance-receipt Section 5.1:</t>

<sourcecode type="json"><![CDATA[{
  "row_number": 1,
  "content_hash": "<hex64>",
  "prev_hash": "<hex64>",
  "row_content_hash": "<hex64>"
}
]]></sourcecode>
<t>The CTQ response's <tt>content_hash</tt> populates the row's <tt>content_hash</tt>
field. A verifier-of-verifier reading the higher chain can walk
sequences of CTQ responses (a chain of verifier conclusions over
chains of receipts) and emit a meta-CTQ response over the
composite.</t>
<t>This recursive pattern enables multi-party audit-chain composition:
a regulator verifying an operator's audit chain may emit a CTQ
response. A higher regulator (e.g. cross-border supervisor)
verifying multiple national regulators' CTQ responses may emit a
meta-CTQ response over those. Each level retains independent
byte-deterministic verifiability.</t>
</section>

<section anchor="sect-5-3-linkage-verification"><name>Linkage Verification</name>
<t>Per draft-hopley-x402-compliance-receipt Section 5.2: a verifier
reading a chain segment recomputes each row's <tt>row_content_hash</tt>
from its first three fields and confirms forward linkage via
<tt>prev_hash</tt>. Any mismatch indicates tampering or chain integrity
loss.</t>
</section>
</section>

<section anchor="sect-6-year-n-auditability-properties"><name>Year-N Auditability Properties</name>
<t>The same six properties pinned by
draft-hopley-x402-canonicalisation-jcs Section 5 apply to the CTQ
response:</t>

<ol spacing="compact">
<li>Self-describing canonicalisation pin via <tt>canon_version</tt>.</li>
<li>No external rule registry required.</li>
<li>Cross-implementation verifiability (8-implementation matrix per
the discipline I-D).</li>
<li>Tamper detection via per-row <tt>content_hash</tt> and chain <tt>prev_hash</tt>
linkage.</li>
<li>Regulatory distinction preserved via closed enumeration.</li>
</ol>
<t>Plus one CTQ-specific property:</t>

<ol spacing="compact" start="6">
<li><strong>Verifier-decision evidence chain.</strong> A consumer reading a
retained CTQ response years after emission can determine
(a) which chain was queried (via <tt>chain_ref</tt>),
(b) which question was asked (via <tt>query_ref</tt>),
(c) who emitted the response (via <tt>verifier_did</tt>),
(d) when the response was emitted (<tt>ctq_timestamp_ms</tt>), and
(e) the categorical answer (<tt>trust_outcome</tt>), without dependence
on the verifier's continued operation. Both the queried chain
and the query bytes are independently re-fetchable at their
content-addresses.</li>
</ol>
</section>

<section anchor="sect-7-composition-with-other-x402-substrate"><name>Composition with Other x402 Substrate</name>

<section anchor="sect-7-1-receipt-format-composition"><name>Receipt Format Composition</name>
<t>A CTQ response composes above the four AlgoVoi-authored receipt
formats. The chain identified by <tt>chain_ref</tt> is typically composed
of records under these formats:</t>

<ul spacing="compact">
<li>draft-hopley-x402-compliance-receipt -- admission events</li>
<li>draft-hopley-x402-settlement-attestation -- per-execution settlements</li>
<li>draft-hopley-x402-cancellation-receipt -- mandate terminations</li>
<li>draft-hopley-x402-refund-receipt -- refunds</li>
</ul>
<t>A verifier walking the chain applies its evaluation discipline to
each receipt's closed enumeration value, considers the linkage via
<tt>prev_hash</tt>, and emits a single categorical response.</t>
</section>

<section anchor="sect-7-2-cryptographic-settlement-proofs"><name>Cryptographic Settlement Proofs</name>
<t>Cryptographically-strong settlement proofs (post-quantum proofs of
payment conditions, validator signatures, STARK proofs of inclusion,
etc.) are orthogonal to this response format. A verifier MAY consult
such proofs as part of its evaluation discipline; the response
records only the categorical conclusion, not the evidence consulted.</t>
</section>

<section anchor="sect-7-3-non-goals"><name>Non-Goals</name>
<t>This document does not encode:</t>

<ul spacing="compact">
<li>The query bytes themselves. The query is identified by <tt>query_ref</tt>
(content-addressed); the query encoding is out of scope.</li>
<li>The verifier's evaluation discipline. The verifier applies
whatever evidence-evaluation logic its risk model requires; the
response records the categorical conclusion, not the discipline.</li>
<li>The transport protocol. CTQ responses are emitted as byte
payloads; transport is out of scope.</li>
</ul>
</section>
</section>

<section anchor="sect-8-iana-considerations"><name>IANA Considerations</name>

<section anchor="sect-8-1-urn-namespace-registration"><name>URN Namespace Registration</name>
<t>This document references the URN
<tt>urn:x402:canonicalisation:jcs-rfc8785-v1</tt> registered by
draft-hopley-x402-canonicalisation-jcs Section 10.1. No additional
URN namespace registration is required by this document.</t>
</section>

<section anchor="sect-8-2-response-format-identifier"><name>Response Format Identifier</name>
<t>This document defines the response format identifier:</t>

<artwork><![CDATA[urn:x402:response:composite-trust-query-v1
]]></artwork>
<t>This identifier MAY be used by composite-trust-query implementations
to refer to CTQ responses as a class. Registration with IANA is
requested under the <tt>x402</tt> URN namespace.</t>
</section>
</section>

<section anchor="sect-9-security-considerations"><name>Security Considerations</name>

<section anchor="sect-9-1-response-tampering"><name>Response Tampering</name>
<t>A CTQ response's <tt>content_hash</tt> is the SHA-256 of its JCS-canonical
bytes. Tampering with any field produces a different hash; the
tampered response fails verification against any chain row
referencing the original <tt>content_hash</tt>.</t>
</section>

<section anchor="sect-9-2-verifier-compromise"><name>Verifier Compromise</name>
<t>A CTQ response is only as trustworthy as the verifier that emitted
it. The format does not specify verifier-identity verification;
consumers MUST establish trust in the verifier through out-of-band
means (DID method, certificate authority, regulator licensing,
mutual-trust agreement). The <tt>verifier_did</tt> field supports
accountability but does not by itself establish trust.</t>
<t>A malicious verifier could emit TRUSTED responses over chains that
do not satisfy the query. Detection is consumer-side: consumers
SHOULD periodically sample CTQ responses by re-walking the
referenced chain themselves, especially for high-value decisions.</t>
</section>

<section anchor="sect-9-3-chain-reference-spoofing"><name>Chain Reference Spoofing</name>
<t>The <tt>chain_ref</tt> field is operator-asserted at emission time. A
verifier could emit a CTQ response with a <tt>chain_ref</tt> pointing to a
chain that does not exist or is no longer retrievable. Mitigation:
consumers SHOULD dereference <tt>chain_ref</tt> against an independent
content-addressed store before relying on a TRUSTED response, at
least at first encounter with a new verifier.</t>
</section>

<section anchor="sect-9-4-query-reference-spoofing"><name>Query Reference Spoofing</name>
<t>The <tt>query_ref</tt> field is similarly operator-asserted. A verifier
could emit a CTQ response claiming to answer query A while actually
having evaluated query B. Mitigation: consumers MUST resolve
<tt>query_ref</tt> against an independent content-addressed store and
confirm the canonical bytes match the query they intended to issue,
before accepting the response.</t>
</section>

<section anchor="sect-9-5-stale-responses"><name>Stale Responses</name>
<t>A CTQ response records the verifier's conclusion at
<tt>ctq_timestamp_ms</tt>. Subsequent events on the underlying chain
(reversal, cancellation, refund) MAY invalidate the conclusion.
Consumers SHOULD re-query at intervals appropriate to the decision
being made; high-value decisions over chains that may evolve SHOULD
NOT rely on CTQ responses older than the consumer's risk model
tolerates.</t>
</section>

<section anchor="sect-9-6-operator-continuity-loss"><name>Operator Continuity Loss</name>
<t>If the verifier becomes unavailable, the CTQ response remains
independently verifiable from retained bytes plus the reference
implementations cited in draft-hopley-x402-canonicalisation-jcs
Section 7. The conclusion the verifier reached at emission time is
fixed in the response bytes; whether to continue relying on that
conclusion is a consumer-side decision.</t>
</section>
</section>

</middle>
<back>
<section anchor="sect-10-references"><name>References</name>

<section anchor="sect-10-1-normative-references"><name>Normative References</name>

<ul spacing="compact">
<li>[RFC2119] Bradner, S., &quot;Key words for use in RFCs to Indicate
Requirement Levels&quot;, BCP 14, RFC 2119, DOI 10.17487/RFC2119,
March 1997.</li>
<li>[RFC8174] Leiba, B., &quot;Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words&quot;, BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017.</li>
<li>[RFC8259] Bray, T., Ed., &quot;The JavaScript Object Notation (JSON)
Data Interchange Format&quot;, STD 90, RFC 8259, DOI 10.17487/RFC8259,
December 2017.</li>
<li>[RFC8785] Rundgren, A., Jordan, B., and S. Erdtman, &quot;JSON
Canonicalization Scheme (JCS)&quot;, RFC 8785, DOI 10.17487/RFC8785,
June 2020.</li>
</ul>
</section>

<section anchor="sect-10-2-informative-references"><name>Informative References</name>

<ul spacing="compact">
<li>draft-hopley-x402-canonicalisation-jcs-v1, Hopley, C., &quot;JCS
Canonicalisation Discipline for Agentic-Payment Receipts&quot;,
May 2026.</li>
<li>draft-hopley-x402-compliance-receipt-00, Hopley, C., &quot;Categorical
Compliance Screening Receipt Format for Agentic-Payment Flows&quot;,
May 2026.</li>
<li>draft-hopley-x402-settlement-attestation-00, Hopley, C.,
&quot;Categorical Settlement Attestation Format for Agentic-Payment
Flows&quot;, May 2026.</li>
<li>draft-hopley-x402-cancellation-receipt-00, Hopley, C.,
&quot;Categorical Mandate Cancellation Receipt Format for
Agentic-Payment Flows&quot;, May 2026.</li>
<li>draft-hopley-x402-refund-receipt-00, Hopley, C., &quot;Categorical
Refund Receipt Format for Agentic-Payment Flows&quot;, May 2026.</li>
<li>AlgoVoi, &quot;Substrate Authorship and Provenance&quot;,
<eref target="https://docs.algovoi.co.uk/substrate-authorship-provenance"> target="https://docs.algovoi.co.uk/substrate-authorship-provenance"</eref></li>
<li>EU Markets in Crypto-Assets Regulation (MiCA, Regulation (EU)
2023/1114), Article 80.</li>
<li>EU Anti-Money Laundering Regulation (AMLR, Regulation (EU)
2024/1624), Article 56.</li>
<li>EU Payment Services Directive 2 (PSD2, Directive 2015/2366),
Articles 64, 72, 89.</li>
<li>EU Anti-Money Laundering Directive 5 (Directive (EU) 2018/843).</li>
<li>EU Anti-Money Laundering Directive 6 (Directive (EU) 2018/1673).</li>
</ul>
</section>
</section>

<section anchor="appendix-a-examples-informative"><name>Appendix A. Examples (Informative)</name>

<section anchor="a-1-trusted-over-a-settled-and-uncancelled-chain"><name>A.1. TRUSTED over a settled-and-uncancelled chain</name>

<sourcecode type="json"><![CDATA[{
  "canon_version": "jcs-rfc8785-v1",
  "chain_ref": "sha256:0dd5d0b76c9b9281fdeb2509ad38ab132b16a17385ca01d976ff9e6e12563a0f",
  "ctq_timestamp_ms": 1716494400000,
  "jurisdiction_flags": ["UK", "EU"],
  "query_ref": "sha256:8b7df143d91c716ecfa5fc1730022f6b421b05cedee8fd52b1fc65a96030ad52",
  "trust_outcome": "TRUSTED",
  "verifier_did": "did:web:api.algovoi.co.uk"
}
]]></sourcecode>
<t>Records the verifier's TRUSTED conclusion over the chain at
<tt>chain_ref</tt> in response to the query at <tt>query_ref</tt>, under joint
UK + EU jurisdiction. The consumer reading this response trusts
that the chain satisfies the query (e.g. &quot;is this payment cleared
for settlement?&quot;) and may proceed with the action the query was
framed to authorise.</t>
</section>

<section anchor="a-2-provisional-over-a-settled-but-not-yet-final-chain"><name>A.2. PROVISIONAL over a settled-but-not-yet-final chain</name>

<sourcecode type="json"><![CDATA[{
  "canon_version": "jcs-rfc8785-v1",
  "chain_ref": "sha256:0dd5d0b76c9b9281fdeb2509ad38ab132b16a17385ca01d976ff9e6e12563a0f",
  "ctq_timestamp_ms": 1716494400000,
  "jurisdiction_flags": ["UK", "EU"],
  "query_ref": "sha256:8b7df143d91c716ecfa5fc1730022f6b421b05cedee8fd52b1fc65a96030ad52",
  "trust_outcome": "PROVISIONAL",
  "verifier_did": "did:web:api.algovoi.co.uk"
}
]]></sourcecode>
<t>Records that the verifier could affirm settlement-inclusion but
not yet operator-required finality on the chain. The consumer
should proceed cautiously and re-query after the pending settlement
attestation reaches the SETTLED state.</t>
</section>

<section anchor="a-3-insufficient-evidence-over-an-incomplete-chain"><name>A.3. INSUFFICIENT_EVIDENCE over an incomplete chain</name>

<sourcecode type="json"><![CDATA[{
  "canon_version": "jcs-rfc8785-v1",
  "chain_ref": "sha256:0dd5d0b76c9b9281fdeb2509ad38ab132b16a17385ca01d976ff9e6e12563a0f",
  "ctq_timestamp_ms": 1716494400000,
  "jurisdiction_flags": ["UK", "EU"],
  "query_ref": "sha256:8b7df143d91c716ecfa5fc1730022f6b421b05cedee8fd52b1fc65a96030ad52",
  "trust_outcome": "INSUFFICIENT_EVIDENCE",
  "verifier_did": "did:web:api.algovoi.co.uk"
}
]]></sourcecode>
<t>Records that the verifier could not reach a conclusion: chain
segments were missing, the query referenced state outside the
chain, or content-addressed pointers could not be dereferenced.
The consumer should gather more evidence rather than proceed under
a defaulted-trusted posture.</t>
</section>

<section anchor="a-4-untrusted-over-a-settled-then-reversed-chain"><name>A.4. UNTRUSTED over a settled-then-reversed chain</name>

<sourcecode type="json"><![CDATA[{
  "canon_version": "jcs-rfc8785-v1",
  "chain_ref": "sha256:0dd5d0b76c9b9281fdeb2509ad38ab132b16a17385ca01d976ff9e6e12563a0f",
  "ctq_timestamp_ms": 1716494400000,
  "jurisdiction_flags": ["UK", "EU"],
  "query_ref": "sha256:8b7df143d91c716ecfa5fc1730022f6b421b05cedee8fd52b1fc65a96030ad52",
  "trust_outcome": "UNTRUSTED",
  "verifier_did": "did:web:api.algovoi.co.uk"
}
]]></sourcecode>
<t>Records that the chain contains evidence negating the query (a
REVERSED settlement attestation, a COMPLIANCE_TERMINATED
cancellation receipt, a REJECTED refund receipt). The consumer
should halt the action the query was framed to authorise.</t>
</section>
</section>

<section anchor="appendix-b-reference-implementations-informative"><name>Appendix B. Reference Implementations (Informative)</name>
<t>The following open-source implementations conform to this format:</t>

<ul>
<li><t>algovoi-composite-trust-query (Python) on PyPI:
<eref target="https://pypi.org/project/algovoi-composite-trust-query/"> target="https://pypi.org/project/algovoi-composite-trust-query/"</eref>
Provides <tt>build_ctq_response()</tt>. Depends on algovoi-substrate for
the JCS canonicalisation primitive. Apache 2.0 licensed.</t>
</li>
<li><t>@algovoi/composite-trust-query (TypeScript) on npm:
<eref target="https://www.npmjs.com/package/@algovoi/composite-trust-query"> target="https://www.npmjs.com/package/@algovoi/composite-trust-query"</eref>
Byte-for-byte parity with the Python sibling. Depends on
@algovoi/substrate for the JCS canonicalisation primitive.
Apache 2.0 licensed.</t>
</li>
</ul>
<t>Conformance vectors:</t>

<artwork><![CDATA[https://github.com/chopmob-cloud/algovoi-jcs-conformance-vectors/tree/main/vectors/composite_trust_query_v1
]]></artwork>
<t>8 byte-level reference vectors + 7 pair invariants + 3 chain
invariants pinning the closed four-element enumeration,
jurisdiction-array-order, canon_version pin, and audit-chain
linkage properties.</t>
</section>

<section anchor="known-adopters-informative"><name>Known Adopters (Informative)</name>
<t>The following downstream parties have published artefacts that
anchor to the composite trust query response format specified by
this document, or to the canonicalisation discipline shared with
this format. Inclusion in this list is informational and reflects
public adoption only; it does not imply endorsement or normative
authority from the listed party.</t>
<table>
<thead>
<tr>
<th>Adopter</th>
<th>Surface</th>
<th>Anchor</th>
</tr>
</thead>

<tbody>
<tr>
<td>AlgoVoi (<tt>api.algovoi.co.uk</tt>)</td>
<td>Production trust-query verifier</td>
<td>All AlgoVoi-emitted CTQ responses under <tt>canon_version: jcs-rfc8785-v1</tt></td>
</tr>
</tbody>
</table><t>Adopters publishing vector sets or response-format extensions that
anchor to this format are encouraged to publish them in
adopter-controlled repositories with <tt>canon_version</tt> recorded
in-band, so each adopter's authorship is unambiguous and their
artefact is independently citable.</t>
<t>This appendix is maintained as a record of observed adoption at
the time of revision; absence from this list is not normative.</t>
</section>

<section anchor="acknowledgments"><name>Acknowledgments</name>
<t>This document, the response format it specifies, and the
conformance vectors derived from it are AlgoVoi work under AlgoVoi
authorship. Substrate authorship history is catalogued at
<eref target="https://docs.algovoi.co.uk/substrate-authorship-provenance"> target="https://docs.algovoi.co.uk/substrate-authorship-provenance"</eref>.</t>
<t>The canonicalisation discipline pinned by Section 4 is normatively
specified in draft-hopley-x402-canonicalisation-jcs under the same
authorship.</t>
<t>This document closes the lifecycle gap at the top of the
agentic-payment receipt stack. Below it sit four
AlgoVoi-authored receipt formats: compliance, settlement,
cancellation, and refund. The CTQ response sits above all four and
provides the verifier-emitted consumer interface for the audit
chains they compose. The five formats share the same
canonicalisation pin, audit-chain row shape, and integer-millisecond
timestamp encoding, so that a consumer of the full agentic-payment
stack requires only one implementation of the canonicalisation
discipline.</t>
<t>The author acknowledges Anders Rundgren as the editor of RFC 8785,
the JSON Canonicalization Scheme on which the discipline builds.</t>
</section>
</back>

</rfc>
