Internet-Draft Cedulon Core December 2026
Dogru Expires 8 June 2027 [Page]
Workgroup:
Network Working Group
Internet-Draft:
draft-dogru-cedulon-core-07
Published:
Intended Status:
Informational
Expires:
Author:
E. C. Dogru
VERAX TEKNOLOJI LIMITED SIRKETI

Spend Receipts and Payment Rail Reconciliation for AI Agents

Abstract

This document addresses auditable payments for AI agents and builds upon state-of-the-art HTTP 402, AP2 and credit card systems. We specify a cryptographically secured payment reconciliation protocol using a Trade Manifest (a signed offer before payment), a Policy Decision Point with default deny, a Spend Receipt (a COSE/CWT claim set issued after a gated payment), and rail-extract reconciliation.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 8 June 2027.

▲

Table of Contents

1. Introduction

Artificial Intelligence (AI) agents involved in travel, stock market transactions, etc. may need the capability of securely paying for their transactions. Previously defined protocols such as HTTP 402 [X402] and Google's Agent Payments Protocol (AP2) [AP2] made it possible: HTTP 402 protocols attach stablecoin settlement to ordinary requests, and AP2 binds user intent to signed mandates. Card networks and processors issue agent-scoped tokens.

What is missing is an interoperable audit layer: a machine-checkable answer to "was this spend allowed by policy, against which offer, and what bytes were delivered?" The answers have limits, and this document states them. "Allowed by policy" is the Receipt Issuer's signed assertion; the audit does not independently re-verify the policy decision (Section 13). What was delivered is machine-checkable only where an attributable payee countersignature binds a delivery hash (Section 6.1). Without such a layer, a prompt-injected or looping agent can drain a rail that has already accepted a valid signature, and a counterparty can ship the wrong artifact.

The name Cedulon is from cedule, the older legal word for a written schedule or note. Cedulon does not clear funds, hold custody, or operate a payment facilitator. An optional escrow actor is defined only as a third-party role interface (Section 15.9). Implementations of this specification MUST NOT take custody of funds or operate escrow (MUST-T8-custody).

Reconciling an internal ledger against an external statement is an old accounting control [PACIOLI], and signing the artifacts on both sides is Grigg's triple-entry idea [GRIGG]. This document profiles that control for parties that are software: a CBOR Object Signing and Encryption (COSE) [RFC9052] receipt shape, an extract shape, and a verification algorithm precise enough that two implementations reach the same finding on the same evidence. The checkpoint chain that extends it over time is in [CEDULON-CHECKPOINT].

A Cedulon audit is intended to be read within the architecture for auditing AI agent delegation and interactions [KUEHLEWIND-AUDIT], which links user intent, delegation and authorization to an execution, registers the resulting records with a Supply Chain Integrity, Transparency, and Trust (SCITT) Transparency Service [RFC9943], and lists financial transactions by agents among its motivating cases. For a spend, this document adds a result that architecture does not define: completeness of signed receipts against an authenticated extract of the rail, over a declared account, rail and time window. This document does not define an integration profile for that architecture. Other related drafts are noted in Section 22.

2. Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" 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.

This document uses Concise Binary Object Representation (CBOR) [RFC8949], CBOR Web Token (CWT) [RFC8392] claim sets, and JavaScript Object Notation (JSON) documents. In the tables, CBOR types are written tstr (text string), bstr (byte string) and uint (unsigned integer).

The following terms are used:

Trade Manifest:

A signed statement produced before payment. It binds a description of goods or service, price, currency, acceptance-criteria hash, cancel condition, expiry, and an optional AP2 mandate reference.

Policy Decision Point (PDP):

The function that evaluates a structured spend request against stored policy. The default is deny.

Rail:

The payment system that moves value and reports what it settled, such as the settlement path behind an HTTP 402 exchange [X402]. A Rail Extract names it by railId.

Payment Adapter:

The component that performs the payment on the rail. It calls the PDP first and is the only path from the agent to the rail (MUST-T5-1).

Spend Receipt:

A signed statement produced after a gated payment attempt. It binds payer, payee, amount, currency, policy hash, manifestHash or an explicit noManifest flag, rail payment reference, timestampMs, nonce, prevReceiptHash, and outcome.

Receipt Issuer:

The party that signs Spend Receipts.

Transparency Service:

An optional SCITT Transparency Service [RFC9943] that registers a signed statement and returns a COSE receipt [RFC9942]. See Section 3.3.

Anchor checkpoint:

The issuer-signed epoch checkpoint immediately preceding the checkpoints an audit presents, which the audit MAY present so that a window need not be audited from its stream's genesis. It is a checkpoint, not a Transparency Service. See Section 12.1.

Dispute Evidence Bundle:

A package of the Trade Manifest, the Spend Receipt, and a delivery hash. It is evidence for a later human or legal process. It is not an arbitral award and not an escrow release.

Decision Token:

A portable, single-use PDP allow encoded as COSE_Sign1. The claim set binds requestHash, policyHash, expiryMs, nonce, and singleUseId. See Section 9.

Rail Extract:

An authenticated list of settlement records for one account, one rail, and one time window. See Section 10.

Verifier:

The party that runs the reconciliation of Section 12 over the receipts, the Rail Extract, and the keys it holds.

Pinned key:

A public key the verifier obtained out of band, as opposed to a key an object carries beside its signature. See Section 11.

Attested:

A receipt or checkpoint that verifies under a usable pinned issuer key. Without a usable pin - none stated, or a stated pin that cannot be read - nothing is attested. See Section 11.1.

Coverage set:

The receipts and checkpoints that count as settlement coverage. Under a usable pinned issuer key it is the attested set - the receipts and checkpoints that verify under a usable pinned issuer key. When no issuer key is pinned, the same members as the diagnostic set (presented-unattested); those members are not attested. When a pin is stated but no key in it can be read, empty: nothing is attested and no settlement is covered. See Section 11.1.

Diagnostic set:

The receipts and checkpoints consumed for refusal naming and for genesis, epoch, and window continuity. Under a usable pinned issuer key, the same members as the coverage set. When no usable issuer key is pinned - including a stated pin that cannot be read - every presented one that no refusal of Appendix B has refused. A member of the diagnostic set is not thereby attested or valid. Totals, receiptCount, and chainHeadHash checks compare a checkpoint only against receipts of the same set; an empty coverage set MUST NOT make those checks report a mismatch against diagnostic checkpoints. See Section 12.1.

Working set:

Where a step does not need the coverage/diagnostic split, the set it consumes: the coverage set for settlement counting, the attested set for attested counting, and the diagnostic set for refusal naming and continuity. Coverage and diagnostic coincide except when a stated issuer pin cannot be read. See Section 12.1.

Presented-unattested:

The state of a receipt or checkpoint the verifier holds no pinned issuer key for. Its signature is checked against the key the object itself carries (Section 7.3), which establishes internal consistency only, so the object is neither attested nor rejected: every presented object is weighed as one set and the completeness guarantee is reported as conditional. It is a state of the report, not a finding code. See Section 11.1.

3. Architecture

The following diagram shows the payment path, the audit path, and the optional transparency service:

  Principal --policy--> PDP
                         ^
                         | request / allow or deny
  Trade Manifest         |
  (optional) -----> Payment Adapter --payment--> Rail
                         |                         |
                         v                         v
                  Receipt Issuer              Rail Extract
                         |                         |
                         v                         |
                   Spend Receipt ---> Verifier <---+
                         |               |
                         v               v
    Transparency Service (optional)  Report

The payer agent never talks to the rail except through an adapter that calls the PDP first (MUST-T5-1).

3.1. Policy Decision Point

The PDP evaluates structured fields only (MUST-T1-1): amount, currency, payee, tool identifier, nonce, optional manifest hash, and evaluation time. It applies limit, velocity, and scope checks (MUST-T2-1, MUST-T2-2). If the PDP is unreachable, uninitialized, or throws, the result is deny (MUST-T2-3). Denied attempts do not increment success counters (MUST-T2-4).

An allow produces a Decision Token whose requestHash covers six fields: amount, currency, payee, tool, nonce, and manifestHash (MUST-T3-4, MUST-T6-1). The token is a COSE_Sign1 object (MUST-T6-4), is single-use (MUST-T6-2), and MAY be carried to the adapter that performs settlement.

3.2. Receipt Issuer

After the adapter attempts settlement (success or a recorded deny that still needs an audit trail for an allowed-then-aborted path), the Receipt Issuer signs a Spend Receipt over the deterministic CBOR encoding of its claims (MUST-T4-1). Verifiers reject bad signatures and a decoded claim map that does not match the presented claims (MUST-T4-2).

3.3. Transparency Service (SCITT)

Parties MAY register the signed receipt (or a privacy-preserving hash encoding) as a SCITT Signed Statement [RFC9943] and attach the COSE receipt (MAY-T4-6). This document does not operate a Transparency Service.

4. Lifecycle

  1. Manifest. Optionally, the payee or a marketplace signs a Trade Manifest. A spend without one is marked noManifest and still passes limit, velocity and scope checks (MUST-T1-2); a deployment MAY refuse such spend (MAY-T1-4).

  2. Policy check. The adapter submits a structured request to the PDP. Default is deny. An allow is a Decision Token (MUST-T6-4).

  3. Payment. On allow, the adapter performs the x402 (or other rail) exchange using exactly the decision fields (MUST-T6-1). The Decision Token is consumed (MUST-T6-2). A reused nonce is denied (MUST-T3-1, MUST-T3-2). A tampered or expired token is denied (MUST-T6-5).

  4. Receipt. The Receipt Issuer signs a Spend Receipt. Rail credentials MUST NOT appear in the receipt, logs, or tool results (MUST-T5-2, MUST-T7-1).

  5. Dispute Evidence Bundle. If delivery bytes do not match the acceptance-criteria hash, an implementation MUST be able to emit a bundle of manifest + receipt + delivery hash (MUST-T8-3). The bundle MUST NOT be described as an arbitral award or escrow release (MUST-T8-4).

Afterwards, a verifier reconciles the receipts against the rail's own extract (Section 12). Appendix C follows one 10.00 TRY spend through these steps.

5. Trade Manifest

A Trade Manifest is a signed offer issued before value moves. It MAY carry an AP2 mandate hash so that user intent and the offer stay linked (SHOULD-T8-5).

A Trade Manifest MUST bind all of the following (MUST-T8-1):

The hash is taken over the exact delivery bytes only. Hashing a schema instance instead would need a marker in the manifest saying so; this document defines no such marker, and until one is defined that use is out of scope rather than an alternative a verifier is expected to guess at. The acceptance-criteria hash therefore fits a delivery whose exact bytes are known when the offer is signed, such as a file; this document defines no such hash for a service, such as a travel booking, whose delivery is not a byte string.

It MAY include ap2MandateHash. The corresponding CBOR label is always present; a missing mandate is encoded as CBOR null. The presented JSON omits that member when the CBOR value is null. A literal JSON null there is a body that differs from the payload (Section 7.3).

It MAY name a payee. An offer that is specific to one counterparty carries that party's payee identifier; when present, every receipt that names this manifest has its payee compared against it as exact octets under MUST-T8-9, on that requirement's two-branch severity. An open offer legitimately omits the member, and no comparison is made. Unlike ap2MandateHash, the label is encoded only when the member is present, so the null convention above does not apply to it.

The manifest is COSE_Sign1 [RFC9052] over a deterministic CBOR claim map (Section 7). manifestHash is the SHA-256 of the signed COSE bytes (MUST-T8-7). A spend bound to a manifest MUST be denied if the requested amount or currency differs from the manifest (MUST-T8-2) or if the manifest is expired (MUST-T3-3).

A spend that is not bound to a verified manifest MUST be marked noManifest on the receipt and MUST still pass limit, velocity, and scope checks (MUST-T1-2). An implementation MAY refuse all noManifest spend (MAY-T1-4).

6. Spend Receipt

The Spend Receipt claim set is carried in COSE_Sign1 [RFC9052] wrapping a CWT-compatible map [RFC8392]. New receipts MUST use the COSE profile (Section 7).

Claims (MUST-T4-3, MUST-T4-4, MUST-T4-7):

Table 1
Claim Description
payer Payer agent identifier
payee Payee identifier
amount Minor units as a decimal string 0|[1-9][0-9]*
currency Currency identifier
policyHash SHA-256 of the canonical policy document (lowercase hex)
manifestHash SHA-256 of the signed manifest COSE bytes, or null when noManifest is true
noManifest Boolean; MUST be true if and only if manifestHash is null
x402PaymentRef Rail payment reference, or null
timestampMs POSIX milliseconds
nonce Unique spend nonce, at least 16 UTF-8 bytes, unique in the issuer scope. The width is a shape check, not a measurement of 128 bits of entropy
prevReceiptHash Previous receipt hash, or null for the first receipt (SHOULD-T4-5)
outcome settled or aborted

Verification applies the same nonce width. A nonce of fewer than 16 UTF-8 bytes does not verify, even when the COSE signature holds. The count is UTF-8 bytes, so eight U+00E9 characters are wide enough. A signer refuses a claim whose type is not the one this table states: payer, payee, currency, and nonce are text, amount is text in the decimal grammar, and a non-null x402PaymentRef is text. signManifest omits a null payee and refuses a non-null payee that is not text.

A receipt with outcome = settled MUST have a non-null x402PaymentRef (MUST-T4-7). An aborted receipt MUST NOT be added into checkpoint totals.

All twelve labels in Section 7.1 are always present. An empty optional value is encoded as CBOR null, never by omitting the label.

receiptHash is the SHA-256 of the receipt's signed COSE bytes, encoded as lowercase hex.

Verifiers MUST reject a receipt if the signature fails or if the decoded claim map does not match the presented claims (MUST-T4-2).

6.1. Optional payee countersignature

A payee MAY attach a countersignature over the issuer's signed Spend Receipt (MAY-T8-10). The profile uses a separate COSE_Sign1 [RFC9052] whose payload is a CBOR map with private-use labels. It carries that payload; it is not the detached-payload form of [RFC9052] Section 4.1, in which the payload is nil:

Table 2
Label Claim CBOR type
-70401 receiptCose bstr (exact issuer COSE_Sign1 bytes)
-70402 deliveredHash bstr (optional; SHA-256 of the exact delivered bytes)

The countersignature uses the header profile in Section 7 and content type application/cedulon-countersign+cbor.

This is a second Sign1 object. It is not the COSE countersignature of [RFC9338]: label 11 is the full countersignature and label 12 is Countersignature0. Either of those would write into the issuer object and change receiptHash after issue, breaking the receipt chain. A separate Sign1 keeps the issuer bytes stable, reuses the header profile of Section 7 with its own kid (the payee's) and its own content type, and is absent by simply omitting the sibling object.

Absence of a countersignature MUST NOT invalidate the issuer receipt (MAY-T8-10). A countersignature travels beside the issuer signature without being covered by it, so anyone holding an honest receipt can append one of their own. Attribution is therefore the gate: a countersignature that cannot be attributed to the pinned payee key - the signature fails, kid or content type does not match, label -70401 is not the issuer COSE bytes (MUST-T8-8), or the signature is valid under some other key - MUST be rejected as approval evidence. What is rejected is the countersignature, not the receipt: the verdict on the untouched issuer receipt MUST NOT change because an unattributable object was attached. An appendable object the issuer signature does not cover must not be able to manufacture a negative result. The identifiers countersign-bad (unverifiable) and countersign-key-mismatch (verifiable under another key) name the discarded object as warnings, and where the verifier pinned a payee key and no attributable countersignature remains, the countersign-missing warning still applies: a discarded forgery is the absence of the payee's word, not a substitute for it.

The optional deliveredHash claim binds delivery to the receipt under the payee's key. A payee who countersigns MAY include the SHA-256 of the exact bytes it delivered in the same signed payload as the issuer receipt bytes. The comparison runs when an attributable countersignature carries deliveredHash, the verifier holds a Trade Manifest that no pin refused, and the receipt names that manifest: its manifestHash equals the manifest's hash, the same scope as MUST-T8-9. A receipt that is noManifest, or names a different manifest, made no statement about this manifest's acceptance criteria and is not compared with it. The two values are compared as digest values: acceptanceCriteriaHash, 64 lowercase hexadecimal characters, is decoded to its 32 octets, and those octets are compared octet for octet with deliveredHash. A mismatch is delivery-mismatch, and it is a finding rather than a warning. Where a usable publisher pin is held, both ends are under a signature that was checked: deliveredHash is in the countersignature, and acceptanceCriteriaHash is the value in a payload whose COSE signature verified under that pin. Where no publisher pin is held, the manifest signature is not checked at all; the acceptance hash is still read from the COSE payload of the bytes the receipt's manifestHash names, when that payload decodes. A JSON body that differs from that payload is not the comparison. The comparison is not made when no publisher pin is held and the payload cannot be decoded, and it is not made when a stated publisher pin refuses the manifest. It is also not made when the receipt has noManifest true, even if manifestHash is filled and no issuer pin is held, and it is not made when acceptanceCriteriaHash is not 64 lowercase hex. A deliveredHash carried by an unattributable countersignature is discarded with it. A countersigner MUST refuse to sign a deliveredHash that is not 32 octets; a verifier that meets one anyway treats the countersignature as carrying no deliveredHash, so the delivery question narrows as it does when the claim is absent, and the signature verdict does not move. A countersignature without the claim remains valid.

A Dispute Evidence Bundle that includes a verified countersignature has stronger evidence that the payee accepted those bytes; the bundle is still not an award (MUST-T8-4).

7. COSE Profile

This profile uses deterministic CBOR [RFC8949] Section 4.2.1 (definite lengths, shortest integer form, map keys sorted in bytewise lexicographic order of their encoded keys). Implementations MUST encode only the types used by Cedulon claim maps: null, bool, unsigned and negative integers, UTF-8 text, byte strings, arrays, and maps (MUST-T4-1).

A decoder MUST refuse a CBOR map that carries a duplicate encoded key (MUST-T4-18).

A decoder MUST also impose a bound on what it will attempt: on encoded size, on nesting depth, and on the number of elements it will decode from an audit input. It MUST refuse an input that exceeds a bound with a named refusal rather than by exhausting memory or the stack, and it SHOULD document the bounds it applies (MUST-T4-19). The numbers are a floor every verifier accepts, fixed in Section 7.3.3, so that two conforming verifiers cannot accept and refuse the same input; a deployment that needs larger inputs raises the bound, and exceeding whatever bound it applies is a named, reported refusal rather than a crash.

7.1. Claim labels

Registered CWT claims [RFC8392] are not required by this profile. Cedulon uses CWT private-use integer labels less than -65536.

Every claim the tables below annotate as hash carries a SHA-256 digest rendered as exactly 64 lowercase hexadecimal characters ([0-9a-f]{64}), the whole value, with no second spelling. That grammar is the claim. It is not the hexadecimal an object travels as. Uppercase, odd-length, or trailing-junk coseHex is hex-not-lowercase, hex-odd, or hex-not-hex (Appendix B.1). Version 0.18.0 accepted some of those transport spellings and could return a balanced or unconditional result on them; a hash claim outside [0-9a-f]{64} was already malformed-policy-hash or the sibling named for that claim, and it still is. A uint in these tables is an integer in 0 to 2^53-1. A wider integer is cbor-too-large. A negative value on timestampMs or on an expiry does not verify. The signer refuses it by name (malformed-timestampMs on a Spend Receipt, malformed-expiresAtMs on a Trade Manifest, malformed-expiryMs on a Decision Token). That name is not a row of Appendix B.1: a verifier returns false, and the audit reports the object as not verified. A signer MUST refuse to sign, and a validator MUST reject, a value that does not match the grammar of its claim. A label these tables do not name is ignored. The decoded claim set of a Spend Receipt, an epoch checkpoint, a Trade Manifest, and a Decision Token keeps the labels the tables name and does not refuse the object for a further one. The witness inclusion payload is the exception, and [CEDULON-CHECKPOINT] states it: an unknown label there does not verify. A decoder may still carry a foreign label; verification does not act on it.

Every amount - of a Spend Receipt, a Trade Manifest, and a settlement record - is a decimal integer string in the grammar 0|[1-9][0-9]*. A signer MUST refuse to sign a value outside it, naming the claim. A settlement record whose amount is outside it refuses the extract (renamed-settlement-amount, Appendix B). For the signed objects a verifier needs no separate pass: step 8 compares amounts as exact octets and never reads them as numbers, and every place that does read an amount as a number - the checkpoint totals, step 9's aggregation of a repeated ref - MUST report a value outside the grammar as malformed-amount rather than interpret it. A receipt the audit counts falls in a checkpoint window (Section 12.1), so its amount is read for that window's totals, whether or not the checkpoint redacted them, and a receipt amount outside the grammar is reported there.

Receipt labels (MUST-T4-3, MUST-T4-4, MUST-T4-7):

Table 3
Label Claim CBOR type
-70001 payer tstr
-70002 payee tstr
-70003 amount tstr
-70004 currency tstr
-70005 policyHash tstr (hash)
-70006 manifestHash tstr (hash) / null
-70007 noManifest bool
-70008 x402PaymentRef tstr / null
-70009 timestampMs uint
-70010 nonce tstr
-70011 prevReceiptHash tstr (hash) / null
-70012 outcome tstr (settled / aborted)

Checkpoint labels (MUST-T11-1):

Table 4
Label Claim CBOR type
-70101 epoch uint
-70102 startMs uint
-70103 endMs uint
-70104 receiptCount uint
-70105 chainHeadHash tstr (hash) / null
-70106 totals map tstr -> tstr / null
-70107 prevCheckpointHash tstr (hash) / null

Manifest labels (MUST-T8-1):

Table 5
Label Claim CBOR type
-70201 description tstr
-70202 amount tstr
-70203 currency tstr
-70204 acceptanceCriteriaHash tstr (hash)
-70205 cancelCondition tstr
-70206 expiresAtMs uint
-70207 ap2MandateHash tstr (hash) / null
-70208 payee tstr (optional; encoded only when present)

Decision Token labels (MUST-T6-4):

Table 6
Label Claim CBOR type
-70301 requestHash tstr (hash)
-70302 policyHash tstr (hash)
-70303 expiryMs uint
-70304 nonce tstr
-70305 singleUseId tstr

7.2. COSE_Sign1 headers

The protected header MUST be a deterministic CBOR map containing (MUST-T4-1, MUST-T4-8):

  • 1 (alg) = -19 (Ed25519, [RFC9864]; the generic EdDSA value -8 from [RFC9053] is deprecated for this profile)

  • 3 (content type) = a tstr that distinguishes the payload: application/cedulon-receipt+cbor, application/cedulon-checkpoint+cbor, application/cedulon-manifest+cbor, application/cedulon-decision+cbor, application/cedulon-countersign+cbor, or application/cedulon-inclusion+cbor

  • 4 (kid) = bstr, mandatory. The profile computes kid as the first eight bytes of SHA-256 over the issuer's SubjectPublicKeyInfo DER, in the Ed25519 SubjectPublicKeyInfo encoding of [RFC8410]. A verifier MUST obtain the public key from an authenticated channel (preconfigured issuer set, directory, or transparency statement) and MUST reject a message whose kid does not match that key.

A protected crit header (label 2) is accepted only when it is an array of safe integers drawn from the labels this profile understands and requires: alg (1), content type (3), and kid (4). Each named label MUST be present, and none may repeat. Any other critical label, or a crit that is not that array, is cose-protected-header. Release 0.18.0 refused every crit header.

The unprotected header MUST be empty, and a decoder MUST refuse a message whose unprotected header is not an empty map, by the name cose-sign1-unprotected, rather than verify the signature and ignore the header (MUST-T4-21): every digest in Section 8.1 is computed over octets that include the unprotected header, which the signature does not cover. The payload MUST be the CBOR encoding of the claim map. The signature is Ed25519 [RFC8032] over the COSE Sig_structure ["Signature1", protected, h'', payload].

7.3. How a signed object is presented

The signed octets above are what this profile defines and what every digest in Section 8.1 is taken over. An object handed to a verifier travels with more than that, and this section names what.

A presented Spend Receipt, epoch checkpoint, Trade Manifest, or Decision Token carries, beside the signed octets, its claim set or body in decoded form and the signer's public key as a SubjectPublicKeyInfo PEM; a countersigned receipt carries the payee's key the same way, and a Spend Receipt or Trade Manifest repeats its signature there as base64 (Section 7.3.3). None of these is inside the signed octets, which is the whole point of naming them here: the signature covers the COSE message and nothing else, so every one of these members is a surface anyone holding the object can rewrite. This is the same shape the Rail Extract states in Section 10, and it is stated once here for the COSE objects rather than left to be inferred from an implementation.

A carried key is not an identity source and MUST NOT be used as one (MUST-T4-11). What a pin does with it depends on the object. The unsigned PEM is not inside the signature, so the rows are not the same question.

Table 7
Object What the pin checks Carried key differs, and the signature would verify under the pin
Spend Receipt the COSE signature under the pinned issuer key. encoding MUST be cose Recorded in Section 7.3.1. The receipt stays attested
Epoch checkpoint, including an anchor the COSE signature under the pinned issuer key Recorded in Section 7.3.1. An anchor with no usable issuer pin anchors nothing
Countersignature the COSE signature under the pinned payee key Recorded in Section 7.3.1. The approval stands
Trade Manifest the COSE signature under the pinned publisher key The carried PEM, the JSON body, and coseHex are recorded in Section 7.3.1. The terms and the hash grammar are the payload. With no pin that body difference is not reported
Decision Token the COSE signature under the carried key, and that key's SubjectPublicKeyInfo equals the expected key the token does not verify
Rail Extract the signature under the carried Ed25519 key, and that key's SubjectPublicKeyInfo equals the pin Recorded in Section 7.3.1. The rows are not reconciled, even when the signature bytes would verify under the pin
Witness receipt the signature under the carried key, and that key's SubjectPublicKeyInfo equals the witness pin Recorded in Section 7.3.1. [CEDULON-CHECKPOINT] states the copies

On a publisher pin that is a set, the carried key is compared with the set, not only with the member that verified this manifest. A manifest signed by A, carrying key B, with the pin set {A, B}, raises no carried-key-mismatch and can be unconditional. Removing B from the set raises carried-key-mismatch. The issuer row above compares a carried key with the key that verified.

An unsigned member is not inside the signed octets. The tables below record ok, the guarantee, and the finding codes for each measured value. A row joins members, pins, or values only where those results are identical, and only for the values the row names. None of these rows is presented-object-malformed. The columns are a row number, the object, ok, and the guarantee. The member, the pin, the value, and the codes follow the table, one entry per row.

The fixture is one object at a time, and every pin other than the one the row names is usable. The account, the rail, and the window are stated, and an unconditional cell is that whole fixture. A Spend Receipt, an epoch checkpoint, and a Rail Extract are one settled receipt in its checkpoint window and a matching extract that names no beneficiary. An anchor is the checkpoint of the epoch before that window: the later receipt's prevReceiptHash is the earlier receipt, and the earlier checkpoint is the anchor. A countersignature is that receipt countersigned, with a payee pin. A Trade Manifest is a receipt that names the manifest, with a publisher pin. A witness receipt and a witness body are a witness list over the checkpoint, and the witness pin is the issuer key. untouched is the member the fixture signed. It is measured so a row is not read as the member's effect when the same codes appear without touching it. A parenthetical id is the finding's id when it is anchor, manifest, an epoch- id (epoch-0, epoch-0-count, epoch-0-head, epoch-1-head), or checkpoint-chain-N for the checkpoint chain walk. The same code with two ids is two findings.

The rows for an unsigned member other than a Spend Receipt claims value follow.

7.3.1. Unsigned surfaces

Table 8
# Object ok guarantee
1 Spend Receipt true conditional
2 Spend Receipt true unconditional
3 Spend Receipt false conditional
4 Spend Receipt true conditional
5 Spend Receipt false conditional
6 Spend Receipt true unconditional
7 Spend Receipt true conditional
8 Spend Receipt false conditional
9 Epoch checkpoint true conditional
10 Epoch checkpoint true unconditional
11 Epoch checkpoint false conditional
12 Epoch checkpoint true conditional
13 Epoch checkpoint false conditional
14 Epoch checkpoint false conditional
15 Epoch checkpoint false conditional
16 Epoch checkpoint false conditional
17 Epoch checkpoint false conditional
18 Anchor true conditional
19 Anchor true unconditional
20 Anchor false conditional
21 Anchor false conditional
22 Anchor false conditional
23 Anchor false conditional
24 Anchor false conditional
25 Countersignature true conditional
26 Countersignature true unconditional
27 Countersignature true conditional
28 Countersignature true conditional
29 Countersignature true conditional
30 Countersignature true conditional
31 Trade Manifest true conditional
32 Trade Manifest true unconditional
33 Trade Manifest true conditional
34 Trade Manifest false conditional
35 Trade Manifest true conditional
36 Trade Manifest true conditional
37 Trade Manifest false conditional
38 Trade Manifest true unconditional
39 Trade Manifest true conditional
40 Trade Manifest false conditional
41 Trade Manifest false conditional
42 Trade Manifest true conditional
43 Trade Manifest true conditional
44 Trade Manifest false conditional
45 Trade Manifest false conditional
46 Rail Extract false conditional
47 Rail Extract true unconditional
48 Rail Extract true conditional
49 Rail Extract false conditional
50 Rail Extract false conditional
51 Rail Extract true conditional
52 Rail Extract false conditional
53 Witness receipt true conditional
54 Witness receipt true conditional
55 Witness receipt true conditional
56 Witness receipt true conditional
57 Witness receipt true conditional
58 Witness receipt true conditional
59 Witness receipt true conditional
60 Witness receipt true conditional
61 Witness receipt true conditional
62 Witness receipt true conditional
63 Witness receipt true conditional
64 Witness receipt true conditional
65 Witness body true conditional
66 Witness body true conditional
67 Witness body true conditional
68 Witness body true conditional
1

Member: publicKeyPem. Pin: issuer usable. Value: another key, absent, null, number, empty, garbage.

Findings: -.

Warnings: carried-key-mismatch, counterparty-unbound.

2

Member: publicKeyPem. Pin: issuer usable. Value: untouched.

Findings: -.

Warnings: counterparty-unbound.

3

Member: publicKeyPem. Pin: issuer none. Value: another key, absent, null, number, empty, garbage.

Findings: receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

4

Member: publicKeyPem. Pin: issuer none. Value: untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-issuer.

5

Member: publicKeyPem. Pin: issuer unreadable. Value: another key, absent, null, number, empty, garbage, untouched.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

6

Member: signature. Pin: issuer usable. Value: other text, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound.

7

Member: signature. Pin: issuer none. Value: other text, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-issuer.

8

Member: signature. Pin: issuer unreadable. Value: other text, absent, null, number, empty, garbage, untouched.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

9

Member: publicKeyPem. Pin: issuer usable. Value: another key, absent, null, number, empty, garbage.

Findings: -.

Warnings: carried-key-mismatch (epoch-0), counterparty-unbound.

10

Member: publicKeyPem, claims. Pin: issuer usable. Value: untouched.

Findings: -.

Warnings: counterparty-unbound.

11

Member: publicKeyPem. Pin: issuer none. Value: another key, absent, null, number, empty, garbage.

Findings: checkpoint-total-mismatch (checkpoint-chain-0, epoch-0).

Warnings: counterparty-unbound, unauthenticated-issuer.

12

Member: publicKeyPem, claims. Pin: issuer none. Value: untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-issuer.

13

Member: publicKeyPem. Pin: issuer unreadable. Value: another key, absent, null, number, empty, garbage.

Findings: checkpoint-total-mismatch (checkpoint-chain-0, epoch-0), settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

14

Member: publicKeyPem, claims. Pin: issuer unreadable. Value: untouched.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

15

Member: claims. Pin: issuer usable. Value: receiptCount plus one, absent, null, number, empty, garbage.

Findings: issuer-key-mismatch (epoch-0), window-coverage.

Warnings: counterparty-unbound.

16

Member: claims. Pin: issuer none. Value: receiptCount plus one, absent, null, number, empty, garbage.

Findings: checkpoint-total-mismatch (checkpoint-chain-0, epoch-0).

Warnings: counterparty-unbound, unauthenticated-issuer.

17

Member: claims. Pin: issuer unreadable. Value: receiptCount plus one, absent, null, number, empty, garbage.

Findings: checkpoint-total-mismatch (checkpoint-chain-0, epoch-0), settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

18

Member: publicKeyPem. Pin: issuer usable. Value: another key, absent, null, number, empty, garbage.

Findings: -.

Warnings: carried-key-mismatch (anchor), counterparty-unbound.

19

Member: publicKeyPem, claims. Pin: issuer usable. Value: untouched.

Findings: -.

Warnings: counterparty-unbound.

20

Member: publicKeyPem. Pin: issuer none. Value: another key, absent, null, number, empty, garbage, untouched.

Findings: checkpoint-head-mismatch (epoch-1-head), checkpoint-total-mismatch (checkpoint-chain-0), receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer, unauthenticated-issuer (anchor).

21

Member: publicKeyPem. Pin: issuer unreadable. Value: another key, absent, null, number, empty, garbage, untouched.

Findings: checkpoint-head-mismatch (epoch-1-head), checkpoint-total-mismatch (checkpoint-chain-0), settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

22

Member: claims. Pin: issuer usable. Value: receiptCount plus one, absent, null, number, empty, garbage.

Findings: checkpoint-head-mismatch (epoch-1-head), checkpoint-total-mismatch (checkpoint-chain-0), issuer-key-mismatch (anchor), receipt-chain-break.

Warnings: counterparty-unbound.

23

Member: claims. Pin: issuer none. Value: receiptCount plus one, absent, null, number, empty, garbage, untouched.

Findings: checkpoint-head-mismatch (epoch-1-head), checkpoint-total-mismatch (checkpoint-chain-0), receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer, unauthenticated-issuer (anchor).

24

Member: claims. Pin: issuer unreadable. Value: receiptCount plus one, absent, null, number, empty, garbage, untouched.

Findings: checkpoint-head-mismatch (epoch-1-head), checkpoint-total-mismatch (checkpoint-chain-0), settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

25

Member: payeePublicKeyPem. Pin: payee usable. Value: another key, absent, null, number, empty, garbage.

Findings: -.

Warnings: carried-key-mismatch, counterparty-unbound.

26

Member: payeePublicKeyPem. Pin: payee usable. Value: untouched.

Findings: -.

Warnings: counterparty-unbound.

27

Member: payeePublicKeyPem. Pin: payee none. Value: another key, absent, null, number, empty, garbage.

Findings: -.

Warnings: counterparty-unbound, countersign-bad, unauthenticated-countersigner.

28

Member: payeePublicKeyPem. Pin: payee none. Value: untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-countersigner.

29

Member: payeePublicKeyPem. Pin: payee unreadable. Value: another key, absent, null, number, empty, garbage.

Findings: -.

Warnings: counterparty-unbound, countersign-bad, countersign-missing.

30

Member: payeePublicKeyPem. Pin: payee unreadable. Value: untouched.

Findings: -.

Warnings: counterparty-unbound, countersign-key-mismatch, countersign-missing.

31

Member: publicKeyPem. Pin: publisher usable. Value: another key, absent, null, number, empty, garbage.

Findings: -.

Warnings: carried-key-mismatch (manifest), counterparty-unbound.

32

Member: publicKeyPem, body, coseHex. Pin: publisher usable. Value: untouched.

Findings: -.

Warnings: counterparty-unbound.

33

Member: publicKeyPem. Pin: publisher none. Value: another key, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-manifest (manifest).

34

Member: publicKeyPem. Pin: publisher unreadable. Value: another key, absent, null, number, empty, garbage, untouched.

Findings: trust-key-unreadable (manifest).

Warnings: counterparty-unbound.

35

Member: body. Pin: publisher usable. Value: amount 2, absent, null, number, empty, garbage.

Findings: -.

Warnings: counterparty-unbound, manifest-body-mismatch (manifest).

36

Member: body. Pin: publisher none. Value: amount 2, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-manifest (manifest).

37

Member: body. Pin: publisher unreadable. Value: amount 2, absent, null, number, empty, garbage, untouched.

Findings: trust-key-unreadable (manifest).

Warnings: counterparty-unbound.

38

Member: signature. Pin: publisher usable. Value: other text, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound.

39

Member: signature. Pin: publisher none. Value: other text, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-manifest (manifest).

40

Member: signature. Pin: publisher unreadable. Value: other text, absent, null, number, empty, garbage, untouched.

Findings: trust-key-unreadable (manifest).

Warnings: counterparty-unbound.

41

Member: coseHex. Pin: publisher usable. Value: other text, absent, null, number, empty, garbage, signed by another key.

Findings: manifest-key-mismatch (manifest).

Warnings: counterparty-unbound, manifest-covers-no-receipt (manifest).

42

Member: coseHex. Pin: publisher none. Value: other text, absent, null, number, empty, garbage, signed by another key.

Findings: -.

Warnings: counterparty-unbound, manifest-covers-no-receipt (manifest), unauthenticated-manifest (manifest).

43

Member: coseHex. Pin: publisher none. Value: untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-manifest (manifest).

44

Member: coseHex. Pin: publisher unreadable. Value: other text, absent, null, number, empty, garbage, signed by another key.

Findings: trust-key-unreadable (manifest).

Warnings: counterparty-unbound, manifest-covers-no-receipt (manifest).

45

Member: coseHex. Pin: publisher unreadable. Value: untouched.

Findings: trust-key-unreadable (manifest).

Warnings: counterparty-unbound.

46

Member: publicKeyPem. Pin: rail usable. Value: another key, absent, null, number, empty, garbage.

Findings: extract-key-mismatch.

Warnings: counterparty-unbound, settlement-comparison-skipped.

47

Member: publicKeyPem, signature. Pin: rail usable. Value: untouched.

Findings: -.

Warnings: counterparty-unbound.

48

Member: publicKeyPem. Pin: rail none. Value: another key, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-extract.

49

Member: publicKeyPem. Pin: rail unreadable. Value: another key, absent, null, number, empty, garbage, untouched.

Findings: trust-key-unreadable.

Warnings: counterparty-unbound.

50

Member: signature. Pin: rail usable. Value: other text, absent, null, number, empty, garbage.

Findings: extract-key-mismatch.

Warnings: counterparty-unbound, settlement-comparison-skipped.

51

Member: signature. Pin: rail none. Value: other text, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-extract.

52

Member: signature. Pin: rail unreadable. Value: other text, absent, null, number, empty, garbage, untouched.

Findings: trust-key-unreadable.

Warnings: counterparty-unbound.

53

Member: issuerPublicKeyPem. Pin: witness usable. Value: another key, absent, null, number, empty, garbage.

Findings: -.

Warnings: checkpoint-not-anchored (epoch-0), counterparty-unbound, witness-inclusion-not-exercised.

54

Member: issuerPublicKeyPem, statementHash, index, treeHead, alg, treeSize. Pin: witness usable. Value: untouched.

Findings: -.

Warnings: counterparty-unbound, witness-inclusion-not-exercised.

55

Member: issuerPublicKeyPem. Pin: witness none, unreadable. Value: another key, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-witness, witness-inclusion-not-exercised.

56

Member: statementHash, treeHead. Pin: witness usable. Value: another hash, absent, null, number, empty, garbage.

Findings: -.

Warnings: checkpoint-not-anchored (epoch-0), counterparty-unbound, witness-inclusion-not-exercised.

57

Member: statementHash, treeHead, leafHash. Pin: witness none, unreadable. Value: another hash, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-witness, witness-inclusion-not-exercised.

58

Member: index. Pin: witness usable. Value: plus one, absent, null, number, empty, garbage.

Findings: -.

Warnings: checkpoint-not-anchored (epoch-0), counterparty-unbound, witness-inclusion-not-exercised.

59

Member: index. Pin: witness none, unreadable. Value: plus one, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-witness, witness-inclusion-not-exercised.

60

Member: alg. Pin: witness usable. Value: other text, absent, null, number, empty, garbage.

Findings: -.

Warnings: checkpoint-not-anchored (epoch-0), counterparty-unbound, witness-inclusion-not-exercised.

61

Member: alg. Pin: witness none, unreadable. Value: other text, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-witness, witness-inclusion-not-exercised.

62

Member: treeSize. Pin: witness usable. Value: plus three, absent, null, number, empty, garbage.

Findings: -.

Warnings: checkpoint-not-anchored (epoch-0), counterparty-unbound, witness-inclusion-not-exercised.

63

Member: treeSize. Pin: witness none, unreadable. Value: plus three, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-witness, witness-inclusion-not-exercised.

64

Member: leafHash. Pin: witness usable. Value: another hash, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, witness-inclusion-not-exercised.

65

Member: publicKeyPem. Pin: witness usable. Value: another key, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, witness-inclusion-not-exercised.

66

Member: publicKeyPem. Pin: witness none, unreadable. Value: another key, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-witness, witness-inclusion-not-exercised.

67

Member: claims. Pin: witness usable. Value: receiptCount plus one, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, witness-inclusion-not-exercised.

68

Member: claims. Pin: witness none, unreadable. Value: receiptCount plus one, absent, null, number, empty, garbage, untouched.

Findings: -.

Warnings: counterparty-unbound, unauthenticated-witness, witness-inclusion-not-exercised.

A Spend Receipt claims value is not one of those rows. Each claim is measured on its own: a value that stays inside that claim's grammar, a value outside it, a missing member, and a claims value that is not the signed object do not share a result just because they share a name. The fixture is that same receipt. The columns, and the list after the table, are the same shape as Section 7.3.1.

7.3.2. Spend Receipt claims

Table 9
# Object ok guarantee
1 Spend Receipt false unconditional
2 Spend Receipt false unconditional
3 Spend Receipt false unconditional
4 Spend Receipt false unconditional
5 Spend Receipt false unconditional
6 Spend Receipt false unconditional
7 Spend Receipt false unconditional
8 Spend Receipt false unconditional
9 Spend Receipt false unconditional
10 Spend Receipt false unconditional
11 Spend Receipt false unconditional
12 Spend Receipt false unconditional
13 Spend Receipt false unconditional
14 Spend Receipt false unconditional
15 Spend Receipt false unconditional
16 Spend Receipt false unconditional
17 Spend Receipt false unconditional
18 Spend Receipt false unconditional
19 Spend Receipt false conditional
20 Spend Receipt false conditional
21 Spend Receipt false conditional
22 Spend Receipt false conditional
23 Spend Receipt false conditional
24 Spend Receipt false conditional
25 Spend Receipt false conditional
26 Spend Receipt false conditional
27 Spend Receipt false conditional
28 Spend Receipt false conditional
29 Spend Receipt false conditional
30 Spend Receipt false conditional
31 Spend Receipt false conditional
32 Spend Receipt false conditional
33 Spend Receipt false conditional
34 Spend Receipt false conditional
35 Spend Receipt false conditional
36 Spend Receipt false conditional
37 Spend Receipt false conditional
38 Spend Receipt false conditional
39 Spend Receipt false conditional
40 Spend Receipt false conditional
41 Spend Receipt false conditional
42 Spend Receipt false conditional
43 Spend Receipt false conditional
44 Spend Receipt false conditional
45 Spend Receipt false conditional
46 Spend Receipt false conditional
47 Spend Receipt false conditional
48 Spend Receipt false conditional
49 Spend Receipt false conditional
50 Spend Receipt false conditional
51 Spend Receipt false conditional
52 Spend Receipt false conditional
53 Spend Receipt false conditional
54 Spend Receipt false conditional
55 Spend Receipt false conditional
56 Spend Receipt false conditional
57 Spend Receipt false conditional
58 Spend Receipt false conditional
59 Spend Receipt false conditional
60 Spend Receipt false conditional
61 Spend Receipt false conditional
62 Spend Receipt false conditional
1

Member: amount. Pin: issuer usable. Value: 2, number, leading zero, empty, null, other text, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

2

Member: currency. Pin: issuer usable. Value: EUR, usd, null, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

3

Member: payer. Pin: issuer usable. Value: other, null, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

4

Member: payee. Pin: issuer usable. Value: other, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

5

Member: nonce. Pin: issuer usable. Value: other, short, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

6

Member: timestampMs. Pin: issuer usable. Value: inside the window, string, null, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

7

Member: policyHash, prevReceiptHash. Pin: issuer usable. Value: another hash.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

8

Member: policyHash. Pin: issuer usable. Value: uppercase, abcd, null, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), malformed-policy-hash, receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

9

Member: manifestHash. Pin: issuer usable. Value: hash and noManifest stays true, hash and noManifest false.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

10

Member: manifestHash. Pin: issuer usable. Value: other text, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), malformed-manifest-hash, receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

11

Member: noManifest. Pin: issuer usable. Value: false, text, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

12

Member: extra. Pin: issuer usable. Value: added.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

13

Member: x402PaymentRef. Pin: issuer usable. Value: other ref, empty, number, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

14

Member: x402PaymentRef. Pin: issuer usable. Value: null.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settled-without-ref, settlement-without-receipt.

Warnings: counterparty-unbound.

15

Member: outcome. Pin: issuer usable. Value: aborted, other text, null, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

16

Member: prevReceiptHash. Pin: issuer usable. Value: other text, uppercase, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), malformed-prev-receipt-hash, receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

17

Member: claims. Pin: issuer usable. Value: absent, null, number, empty, text, true, array.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

18

Member: claims. Pin: issuer usable. Value: empty object.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), malformed-manifest-hash, malformed-policy-hash, malformed-prev-receipt-hash, receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound.

19

Member: amount. Pin: issuer none. Value: 2.

Findings: checkpoint-total-mismatch (epoch-0), receipt-chain-break, settlement-mismatch.

Warnings: counterparty-unbound, unauthenticated-issuer.

20

Member: amount. Pin: issuer none. Value: number, leading zero, empty, null, other text, absent.

Findings: malformed-amount (epoch-0), receipt-chain-break, settlement-mismatch.

Warnings: counterparty-unbound, unauthenticated-issuer.

21

Member: currency. Pin: issuer none. Value: EUR, usd, null, absent.

Findings: checkpoint-total-mismatch (epoch-0), receipt-chain-break, settlement-mismatch.

Warnings: counterparty-unbound, unauthenticated-issuer.

22

Member: payer. Pin: issuer none. Value: other, null, absent.

Findings: receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

23

Member: payee. Pin: issuer none. Value: other, absent.

Findings: receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

24

Member: nonce. Pin: issuer none. Value: other, short, absent.

Findings: receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

25

Member: timestampMs. Pin: issuer none. Value: inside the window, string.

Findings: receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

26

Member: timestampMs. Pin: issuer none. Value: null, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), receipt-chain-break, window-coverage.

Warnings: counterparty-unbound, unauthenticated-issuer.

27

Member: policyHash. Pin: issuer none. Value: another hash.

Findings: receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

28

Member: policyHash. Pin: issuer none. Value: uppercase, abcd, null, absent.

Findings: malformed-policy-hash, receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

29

Member: manifestHash. Pin: issuer none. Value: hash and noManifest stays true, hash and noManifest false.

Findings: receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

30

Member: manifestHash. Pin: issuer none. Value: other text, absent.

Findings: malformed-manifest-hash, receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

31

Member: noManifest. Pin: issuer none. Value: false, text, absent.

Findings: receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

32

Member: extra. Pin: issuer none. Value: added.

Findings: receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

33

Member: x402PaymentRef. Pin: issuer none. Value: other ref, empty, number, absent.

Findings: receipt-chain-break, receipt-without-settlement, settlement-without-receipt.

Warnings: counterparty-unbound, unauthenticated-issuer.

34

Member: x402PaymentRef. Pin: issuer none. Value: null.

Findings: receipt-chain-break, receipt-without-settlement, settled-without-ref, settlement-without-receipt.

Warnings: counterparty-unbound, unauthenticated-issuer.

35

Member: outcome. Pin: issuer none. Value: aborted.

Findings: checkpoint-total-mismatch (epoch-0), receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound, unauthenticated-issuer.

36

Member: outcome. Pin: issuer none. Value: other text, null, absent.

Findings: receipt-chain-break, settlement-without-receipt.

Warnings: counterparty-unbound, unauthenticated-issuer.

37

Member: prevReceiptHash. Pin: issuer none. Value: another hash.

Findings: checkpoint-head-mismatch (epoch-0-head), receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

38

Member: prevReceiptHash. Pin: issuer none. Value: other text, uppercase, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), malformed-prev-receipt-hash, receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

39

Member: claims. Pin: issuer none. Value: absent, null, number, empty, text, true, array.

Findings: receipt-chain-break.

Warnings: counterparty-unbound, unauthenticated-issuer.

40

Member: claims. Pin: issuer none. Value: empty object.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), malformed-manifest-hash, malformed-policy-hash, malformed-prev-receipt-hash, receipt-chain-break, settlement-without-receipt, window-coverage.

Warnings: counterparty-unbound, unauthenticated-issuer.

41

Member: amount. Pin: issuer unreadable. Value: 2.

Findings: checkpoint-total-mismatch (epoch-0), settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

42

Member: amount. Pin: issuer unreadable. Value: number, leading zero, empty, null, other text, absent.

Findings: malformed-amount (epoch-0), settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

43

Member: currency. Pin: issuer unreadable. Value: EUR, usd, null, absent.

Findings: checkpoint-total-mismatch (epoch-0), settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

44

Member: payer. Pin: issuer unreadable. Value: other, null, absent.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

45

Member: payee. Pin: issuer unreadable. Value: other, absent.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

46

Member: nonce. Pin: issuer unreadable. Value: other, short, absent.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

47

Member: timestampMs. Pin: issuer unreadable. Value: inside the window, string.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

48

Member: timestampMs. Pin: issuer unreadable. Value: null, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), settlement-without-receipt, trust-key-unreadable, window-coverage.

Warnings: counterparty-unbound.

49

Member: policyHash. Pin: issuer unreadable. Value: another hash.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

50

Member: policyHash. Pin: issuer unreadable. Value: uppercase, abcd, null, absent.

Findings: malformed-policy-hash, settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

51

Member: manifestHash. Pin: issuer unreadable. Value: hash and noManifest stays true, hash and noManifest false.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

52

Member: manifestHash. Pin: issuer unreadable. Value: other text, absent.

Findings: malformed-manifest-hash, settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

53

Member: noManifest. Pin: issuer unreadable. Value: false, text, absent.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

54

Member: extra. Pin: issuer unreadable. Value: added.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

55

Member: x402PaymentRef. Pin: issuer unreadable. Value: other ref, empty, number, absent.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

56

Member: x402PaymentRef. Pin: issuer unreadable. Value: null.

Findings: settled-without-ref, settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

57

Member: outcome. Pin: issuer unreadable. Value: aborted.

Findings: checkpoint-total-mismatch (epoch-0), settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

58

Member: outcome. Pin: issuer unreadable. Value: other text, null, absent.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

59

Member: prevReceiptHash. Pin: issuer unreadable. Value: another hash.

Findings: checkpoint-head-mismatch (epoch-0-head), settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

60

Member: prevReceiptHash. Pin: issuer unreadable. Value: other text, uppercase, absent.

Findings: checkpoint-head-mismatch (epoch-0-head), malformed-prev-receipt-hash, settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

61

Member: claims. Pin: issuer unreadable. Value: absent, null, number, empty, text, true, array.

Findings: settlement-without-receipt, trust-key-unreadable.

Warnings: counterparty-unbound.

62

Member: claims. Pin: issuer unreadable. Value: empty object.

Findings: checkpoint-head-mismatch (epoch-0-head), checkpoint-total-mismatch (epoch-0, epoch-0-count), malformed-manifest-hash, malformed-policy-hash, malformed-prev-receipt-hash, settlement-without-receipt, trust-key-unreadable, window-coverage.

Warnings: counterparty-unbound.

With no pin held, a Spend Receipt, an epoch checkpoint, or a Rail Extract is checked against the key it carries: the check says the object is internally consistent and says nothing about who signed it. A Trade Manifest with no pinned key is not checked against its carried key at all, nor is its content type read (Appendix B, unauthenticated-manifest). The terms, the acceptance hash, and a manifest payee that an audit compares are still the COSE payload, not a JSON body that differs from it (MUST-T4-2).

7.3.3. The presented form

Two verifiers accept the same inputs only if they read the same inputs, so the form an object travels in beside its signed octets is fixed here. A presented object is a JSON object, encoded as in Section 8 wherever it is hashed, with these members:

Table 10
Object Members
Spend Receipt claims, signature, publicKeyPem, encoding, coseHex; optionally counterCoseHex and payeePublicKeyPem
Epoch checkpoint claims, publicKeyPem, encoding, coseHex
Trade Manifest body, signature, publicKeyPem, encoding, coseHex
Decision Token claims, publicKeyPem, encoding, coseHex
Rail Extract body, signature, publicKeyPem (Section 10)
Witness receipt statementHash, index, treeHead, issuerPublicKeyPem, coseHex; on a five-entry payload also alg and treeSize; optionally checkpoint, inclusionProof, and leafHash ([CEDULON-CHECKPOINT])
  • claims and body carry the decoded claim set as a JSON object whose member names are the claim names of Section 7.1; a tstr is a JSON string, a uint a JSON number, a bool a JSON boolean, null JSON null, and the totals map a JSON object of strings. A Trade Manifest does not write ap2MandateHash when the CBOR value is null: that member is omitted from the presented JSON (Section 5). No claim of these claim sets is a byte string, so none is written in JSON: a byte string such as deliveredHash exists only inside the COSE octets that carry it.

  • coseHex, and counterCoseHex for the countersignature of Section 6.1, are the COSE_Sign1 octets in lowercase hexadecimal. For an object in the COSE encoding these octets are the signed object; claims or body MUST equal the claim set decoded from them (MUST-T4-2). A Spend Receipt or an epoch checkpoint does not verify when the presented claims differ from that map. A Spend Receipt claims value that is not an object does not verify either. A Trade Manifest does not: a presented body that differs, while the COSE signature verifies under the publisher pin, is the warning manifest-body-mismatch, the manifest stays attributed, and the terms are the payload. With no pin that difference is not reported.

  • signature is the signature in base64 with padding, the alphabet of [RFC4648] Section 4. For a Spend Receipt or a Trade Manifest it is the signature carried in its COSE_Sign1 octets.

  • publicKeyPem and payeePublicKeyPem are SubjectPublicKeyInfo PEM, carried and never an identity source (above).

  • encoding is an acceptance condition of a Spend Receipt only. It MUST be "cose". Any other value, or a missing encoding, does not verify (MUST-T4-1): the audit reports receipt-chain-break with the name receipt-not-cose, and the receipt covers no settlement (MUST-T4-10). The JSON encoding the companion implementation offered before this profile is that case. An epoch checkpoint, a Trade Manifest, and a Decision Token do not read encoding. A missing value or "json" beside a coseHex that verifies does not, by itself, refuse those objects.

  • A copy of the signature placed beside the COSE octets is not an acceptance condition of verification. Unpadded base64 still verifies. Departure from this presented form is a separate report and does not, by itself, decide the signature. inclusionProof is a member of the witness receipt. It is not a field of the Spend Receipt, and a proof carried on a Spend Receipt is not read.

A member this table does not name carries no meaning a verifier may act on.

The decoder bounds of MUST-T4-19 are fixed as a floor so that no two conforming verifiers differ over an object on size alone: an otherwise conforming input within 65536 octets of encoded CBOR, 16 levels of nesting below the outermost item, 4096 elements in an array or pairs in a map, and 16384 octets in a single string MUST NOT be refused solely because of resource bounds, and a verifier MAY refuse one beyond any of them. The four limits apply separately to the outer COSE_Sign1 and to the payload map. The payload is a CBOR byte string, and that byte string is itself subject to the 16384-octet string limit, so a payer text of 16383 octets can make the payload byte string exceed 16384 and return cbor-too-large while the whole COSE object is still under 65536. The floor does not make an input conforming: one within it that another rule of this document refuses (Appendix B) is refused all the same. The reference implementation decodes up to these numbers and refuses beyond them, by the names cbor-too-large and cbor-too-deep. How many objects one audit may present is a separate, audit-wide bound, stated with audit-too-large in the Finding codes section.

8. Canonical JSON encoding

Not everything this document hashes or signs is CBOR. The policy document, the six request fields bound by a Decision Token, and the scoped body of a Rail Extract are JSON. Two implementations could agree on every other requirement in this document and still produce different bytes unless the encoding is named, which makes an independent verifier impossible to write from the text. This section names that encoding.

Where this document says "the canonical encoding" of a JSON document, it means the encoding defined by [RFC8785], and the octets hashed or signed are the UTF-8 octets of that encoding.

Three notes on the boundary of that reference:

8.1. Which octets are hashed

Every hash-valued field in this document is SHA-256 [RFC6234] of the input named below. All but two are rendered as lowercase hexadecimal, and a third differs in another respect. kid differs only in its rendering: the digest is computed over the same stated input and then truncated to its first 8 bytes, carried as a byte string rather than as hex (Section 7 states the same rule where the header is defined). ap2MandateHash differs in whose digest it is: AP2 defines the mandate and its octets, and this document carries the result opaquely rather than restating a rule it does not own. deliveredHash differs in its carrier: it is a claim in a CBOR map and is carried as the raw 32 digest bytes (bstr), not as hex; comparisons against acceptanceCriteriaHash are made over the digest value.

Table 11
Field Input to SHA-256
receiptHash the signed COSE_Sign1 octets of the receipt
manifestHash the signed COSE_Sign1 octets of the Trade Manifest
checkpointHash the signed COSE_Sign1 octets of the checkpoint
statementHash the signed COSE_Sign1 octets of the statement
acceptanceCriteriaHash the exact delivery bytes, as defined in Section 5
deliveredHash the exact bytes the payee delivered, under the same input rule as acceptanceCriteriaHash, computed by the payee when it countersigns
policyHash the UTF-8 octets of the canonical policy document
requestHash the UTF-8 octets of the canonical six-field request document
kid the SubjectPublicKeyInfo DER; the digest is then truncated to its first 8 bytes
ap2MandateHash the octets AP2 defines for its mandate; not profiled by this document

Wherever this table, or any other sentence in this document, says "the signed COSE_Sign1 octets", those are the octets of the untagged four-element COSE_Sign1 array of [RFC9052]. This profile never wraps a message in CBOR tag 18, and the vectors in Appendix A carry the untagged form. A verifier that hashed a tagged copy would compute a different digest for every object in this profile, so the choice is stated here once rather than left to be inferred from the vectors.

The six fields of the request document are the ones MUST-T6-1 names: amount, currency, payee, tool, nonce, and manifestHash.

The request document is a JSON object carrying exactly those six members and no others, every member always present. amount is the decimal string of the request, in the amount syntax the receipt claims table states, never a JSON number: [RFC8785] encodes the number 1 and the string "1" differently, and an implementation free to pick either would produce two digests for one request. currency, payee, and nonce are the request's text strings. tool is the request's text string, or JSON null where the deployment names none. manifestHash is the lowercase hexadecimal string, or JSON null for a spend bound to no manifest; an absent value is null, never an omitted member. A document with a seventh member, a missing member, or another type for one of these is not the request document this section defines.

The policy document is different on purpose, and the difference is scope rather than an oversight. Its member set is the deployment's own: this document defines how the bytes of whatever policy document a PDP evaluates are encoded (Section 8) and digested, not what its members are. policyHash binds a spend to the exact bytes its PDP evaluated; it is not a value two deployments are expected to compute from a shared schema, and nothing in the verification algorithm compares one deployment's policyHash to another's.

9. Decision Token

A Decision Token is the portable encoding of a PDP allow. It is COSE_Sign1 with the header profile in Section 7 and the labels in Section 7.1. All five labels are always present (MUST-T6-4).

requestHash MUST be the SHA-256 of the canonical encoding of the six fields the PDP evaluated (MUST-T6-1), rendered as lowercase hexadecimal; Section 8 defines that encoding and Section 8.1 states the octets. policyHash MUST be the SHA-256 of the canonical policy document the PDP evaluated. expiryMs is a Unix time in milliseconds after which the token MUST be treated as expired (SHOULD-T6-3): expired when the evaluation time is strictly greater than expiryMs, not yet expired at exactly expiryMs, on the same boundary discipline MUST-T3-3 states for the manifest. nonce is the request nonce. singleUseId is the identifier consumed on the first settlement attempt (MUST-T6-2).

A party that accepts a Decision Token MUST reject it if the signature fails, if kid does not match a configured PDP key, if the content type is not application/cedulon-decision+cbor, if the decoded claim map does not match the presented claims, if requestHash or policyHash is not 64 lowercase hexadecimal characters, or if expiryMs is in the past (MUST-T6-5). An empty requestHash does not verify at the exact expiry instant.

10. Rail Extract Profile

A verifier checks completeness against a rail extract, not against the issuer's own receipts alone (MUST-T10-7).

10.1. Record schema

The extract body is a JSON document. Each settlement record MUST contain the following members, under these names:

Table 12
Member JSON type
ref string (rail payment reference)
amount string matching 0|[1-9][0-9]*
currency string
timestampMs number (POSIX milliseconds, an integer)

These member names are normative. A rail MAY add members of its own to a record; it MUST NOT rename the four above. The types above are stated in JSON terms.

A record MAY carry a beneficiary member (string). A rail that can resolve a payment reference to the party credited declares it there; when present, it is compared against the payee of the receipt that names the same ref on a singular local match, and a difference is reported (beneficiary-mismatch). A repeated-ref aggregate and the carried match at a window edge do not compare beneficiary. Resolving a reference to a beneficiary is a feature of the rail's own system: this profile does not assume it, and measures it only when the rail declares it.

10.2. Scope

An extract is scoped to one account identifier, one rail identifier, and one half-open time window [windowStartMs, windowEndMs). The signed body is one JSON document with at least these members:

Table 13
Member JSON type
accountId string
railId string
windowStartMs number (POSIX milliseconds, an integer)
windowEndMs number (POSIX milliseconds, an integer)
clockSkewMs number (milliseconds, a non-negative integer; optional; see Section 12)
settlements array of settlement records (schema above)

All six named members except clockSkewMs MUST be present; a body missing one, or a record renaming a core member, MUST be refused by name at both ends - by the signer before it signs and by the verifier before it checks a signature - so a malformed extract is the same refusal on both sides rather than a signature verdict. That named body refusal is what a readable rail pin reports. A missing outer object, an outer value 0, and an outer value "" take the absence path. An outer value [] is presented-object-malformed. With no pin, a body that omits accountId is not well-formed. The named refusal is missing-extract-accountId, the comparison is skipped, the audit does not emit extract-scope-mismatch, and the scope record does not name accountId. A broken signature under an unreadable rail pin still measures the rows and can report trust-key-unreadable and settlement-without-receipt. Additional members beyond these are the rail's to add, as with records. The table is the required members plus the optional clockSkewMs. An extra member is not a refusal. It is inside the canonical JSON the signature covers.

The integer-valued members - windowStartMs, windowEndMs, each record's timestampMs, and clockSkewMs - MUST be integers of magnitude at most 2^53 - 1, the range a JSON number carries exactly, and clockSkewMs MUST NOT be negative; a value outside those bounds, or a non-integer, is refused by name in the same way as a missing member. windowEndMs MUST be greater than windowStartMs: the window is half-open, so one that does not end after it starts declares no population, and a body carrying one is refused by name (malformed-extract-window) in the same way, at both ends.

The body is read as text before it is read as an object. A text in which any object repeats a member name is refused as json-duplicate-key at both ends, before parsing and before any signature is checked (MUST-T4-20, Section 8); a signer that parsed first would sign one of the two values and an honest verifier could check the other.

clockSkewMs, when present, declares the boundary allowance the verifier applies at this window's edges during reconciliation (Section 12); when absent, the profile default of 300000 milliseconds (five minutes) applies. The window runs from windowStartMs inclusive to windowEndMs exclusive. An unmatched timestamp t is inside the allowance when clockSkewMs is positive and either t < windowStartMs + clockSkewMs or t >= windowEndMs - clockSkewMs. There is no far-side cap: a row an hour after windowEndMs is inside the closing predicate when the allowance is 1, and it is also extract-scope-mismatch because it is outside the declared window. An allowance of zero defers nothing, so a timestamp equal to windowEndMs is outside the window and is not boundary-deferred.

10.3. Authentication

The rail signs Ed25519 [RFC8032] over the canonical encoding of the scoped body, which is a JSON document and therefore takes the encoding of Section 8: the signed octets are the UTF-8 octets of the [RFC8785] encoding of the body above. The signature and the rail's public key travel beside the body, the signature as base64 and the key as a SubjectPublicKeyInfo PEM; neither is part of the signed octets. A verifier MUST obtain the extract from the rail or from a signature the rail published (MUST-T10-7). A deployment that cannot do so is running the reconciliation against evidence it did not obtain independently, and MUST report the guarantee as conditional.

A signature on an extract proves internal consistency, not origin: a key generated by whoever produced the object verifies against itself. The verifier therefore MUST obtain the rail's public key out of band and MUST verify the extract signature against that key (MUST-T10-8). For a Rail Extract that check is the one in the table of Section 7.3: the signature is verified under the key the extract carries, and that key's SubjectPublicKeyInfo MUST equal the pin. A carried key that differs does not verify, even when the signature bytes would verify under the pin. A key the extract carries is neither the rail's identity nor a fallback for one the verifier did not obtain. Where no such key is held, the carried key is the only key present, so the signature check that runs against it says the extract is internally consistent and says nothing about who produced it, and the verifier MUST treat the guarantee as conditional.

Keys are compared as bytes. A verifier MUST compare the pinned key and the key that signed the extract by their SubjectPublicKeyInfo DER encoding, not by any text encoding of it, so that the same key presented in a different envelope still compares equal (MUST-T10-9). A pinned key the verifier cannot decode is a fault in the verifier's own configuration, not evidence about the extract, and MUST be reported as trust-key-unreadable rather than as a key mismatch.

The signature check uses the key the extract carries, and only an Ed25519 key. PEM and a bare base64 SubjectPublicKeyInfo of the same key are one key (MUST-T10-9). A carried key whose SubjectPublicKeyInfo differs from the pin does not verify: the finding is extract-key-mismatch, the rows are not reconciled (MUST-T10-20), and that result stands even when the signature bytes would verify under the pin. A key that is not Ed25519 does not verify.

What a verifier emits for an extract it cannot authenticate depends on whether it stated an expectation. With no pinned key the verifier has asserted nothing, so the condition is unauthenticated-extract whatever the extract carries - a signature that verifies against the carried key establishes internal consistency and not origin, and one that fails or is refused is not a verdict about a key either. It is a warning: completeness findings may still be computed, but the guarantee is conditional on the extract being authentic. With a pinned key the verifier has asserted what it requires, and an extract that fails to meet it is a failure rather than a caveat; see the verification algorithm for which finding applies. See Section 15.

10.4. Scope agreement

An extract declares a window and carries settlement records. The two MUST agree: a verifier MUST report every settlement record whose timestampMs falls outside [windowStartMs, windowEndMs) as extract-scope-mismatch, identified by that record's ref (MUST-T10-10). This check is about the extract's internal consistency and MUST be performed whether or not a rail key is pinned.

A verifier that knows which account, rail, and window it is auditing MUST also check the extract against that expectation and MUST fail closed when the extract does not cover it (MUST-T10-11). An extract for another account or rail, or one whose window does not span the period under audit, cannot support a completeness claim about that period. An expected window is two safe integers with the start strictly before the end. Any other pair, including null, empty text, NaN, or a reversed interval, is extract-scope-mismatch and the audit fails. It is not an absent window and it is not an unconditional guarantee. Both ends omitted is the absent case.

A verifier that has not stated the period under audit MUST emit unstated-audit-window and MUST treat the guarantee as conditional (MUST-T10-15), whatever else verifies.

Likewise, a verifier that has not stated the account or the rail under audit MUST emit unstated-audit-scope and MUST treat the guarantee as conditional (MUST-T10-18). Where no rail key is pinned at all, all three axes are equally unstated and unauthenticated-extract is the condition reported.

A balanced audit under an unconditional guarantee is true of one account, on one rail, over one window, so a report that carries it MUST also carry that account, rail and window (MUST-T10-19). A completeness claim about an account needs one such report per rail that account can settle on; enumerating those rails is the deployment's statement.

11. Trust roots

Section 10 states the rule for one object: a signature proves internal consistency, not origin, so the verifier obtains the rail key out of band and checks the extract against it, and the key the extract carries is neither the rail's identity nor a fallback for one the verifier did not obtain (MUST-T10-8). The same discipline applies to the issuer: a verifier obtains the public key from an authenticated channel and rejects a kid that does not match that key (MUST-T4-8). This section states the verification algorithm, the separate root inputs, and the error semantics that name a missing or mismatched pin, for every signed object in the profile.

Table 14
Object Key the verifier pins Section
Rail Extract rail key Section 10
Spend Receipt, epoch checkpoint issuer key Section 11.1
Payee countersignature payee key Section 11.2
Decision Token the deployment's own PDP signing key Section 11.3
Trade Manifest publisher key Section 11.4

Without these roots, a verifier that checks a Spend Receipt against the key the receipt carries accepts a receipt signed by any key at all, and a forged receipt can make an unreceipted settlement look covered.

11.1. The issuer root

A verifier MUST obtain the issuer's public key out of band and MUST verify Spend Receipt and epoch checkpoint signatures against that key. A key the object carries is not that key: it establishes no signer identity and is not a fallback for a pin the verifier does not hold (MUST-T4-9, MUST-T4-11). Where no issuer key is held, a signature checked against the key its own object carries establishes internal consistency and nothing more, which is the state Section 7.3 and the last row of the table below describe. A verifier that holds no such key and is presented with any Spend Receipt or epoch checkpoint MUST treat the completeness guarantee as conditional and SHOULD report the condition; the identifier unauthenticated-issuer is used for it in this document.

An audit given no receipts and no checkpoints rests on the extract alone and is not made conditional by this requirement.

Reporting a mismatch is not sufficient on its own. A receipt that does not answer to the pinned issuer key MUST NOT count as coverage for the settlement it names, and the settlement MUST still be reported as uncovered (MUST-T4-10).

Keys are compared as bytes, by their SubjectPublicKeyInfo DER encoding, on the same terms as MUST-T10-9. A pinned issuer key the verifier cannot decode is a fault in its own configuration and MUST be reported as trust-key-unreadable rather than as a mismatch against the objects; where no pinned key can be decoded at all, nothing is attested and the verifier MUST NOT fall back to accepting the keys the objects carry (MUST-T4-11).

Membership in the attested set follows one rule: the signature verifies under the pinned issuer key that the object's kid names. Routing by kid is exclusive. The signature is checked under the key kid names and no other: it is never tried against the remaining keys of a pinned set (MUST-T4-12), and an object whose kid names no pinned key is not checked under any pinned key, even one its signature would verify under. kid decides which key is asked; the signature decides the answer. The key an object carries beside its signature is not an identity source either, because it travels outside the signed octets and anyone can rewrite it. Three consequences are stated so that implementations do not diverge on them. First, an honestly signed object whose carried key was swapped stays attested: the swap is reported (carried-key-mismatch, a warning) and MUST NOT move the object out of the attested set or change the verdict, on the same reasoning as Section 6.1 - a surface the signature does not cover must not be able to manufacture a negative result. A direct check that returns false when the carried SubjectPublicKeyInfo differs from the pin, without asking the pin, is not this table. The audit follows the table: it verifies under the pin and keeps the object. Second, an object that claims the pin, by its carried key or its kid, but does not verify under it is excluded from the attested set and MUST still be walked and named - for a receipt, receipt-chain-break with a signature-failed detail - never silently dropped; an object that neither verifies under the pin nor claims it is issuer-key-mismatch, excluded, and the settlement it names stays uncovered. Third, a signature that would verify under a pinned key its kid does not name attests nothing: with a kid that names no pinned key the object is issuer-key-mismatch; with a kid that names another pinned key it fails under the key it names, and is the second case.

The rule, read out per cell (steps 6 and 8 are the verification algorithm's):

Table 15
Claims the pin (carried key or kid) Verifies under the pinned key its kid names Result
yes yes attested; a carried key other than the verifying one is carried-key-mismatch, a warning, and does not move the receipt
yes no excluded from the attested set; still walked and named in step 6 (receipt-chain-break, signature-failed detail); its settlement stays uncovered in step 8. This includes an object whose kid names one pinned key and whose signature verifies only under another: the other key is not tried. A checkpoint has no chain walk to be named in, so it is reported as issuer-key-mismatch on this row as well as the next, and the window it would have covered is reported uncovered
no no, or not asked: a kid that names no pinned key routes to none, so a pinned key its signature would verify under is not tried issuer-key-mismatch; excluded; its settlement stays uncovered in step 8 (MUST-T4-9, MUST-T4-10)
no pin held no pin to verify under no comparison against a key the verifier holds happens, and the keys the objects carry are not a fallback for one (MUST-T4-11); each signature is still checked against the key its own object carries (Section 7.3), which establishes that the object is internally consistent and nothing about who signed it, so a broken signature is still named (receipt-chain-break, checkpoint-total-mismatch) while two different issuers cannot be told apart; receipts are presented-unattested, the verifier reports unauthenticated-issuer, and the three findings that charge a party rather than describe the submission - duplicate-ref (step 7), duplicate-nonce (step 7), and manifest-terms-mismatch (step 4) - take the two-branch severity of MUST-T8-9: they are reported as warnings and do not by themselves fail the audit. Every other finding keeps its severity, so a finding the extract founds, such as settlement-mismatch in step 9, still fails it

A verifier MUST accept an issuer root that is a set of keys rather than a single key (MUST-T4-12), so that a key rotation mid-window does not force it off the pin. The same acceptance applies to a publisher pin, a witness pin, and a rail pin: a verifier MUST accept each of those roots as a set of keys, so a rotation inside the window does not force it off the pin.

11.2. The payee root

The optional countersignature in Section 6.1 travels beside the issuer signature without being covered by it. Anyone holding an honest receipt can append a countersignature of their own, so a verifier that checks it against the key carried next to it learns only that some key signed something.

A countersignature MUST NOT be treated as evidence that the payee approved the payment unless it verifies against a payee key the verifier obtained out of band (MUST-T4-13). Without such a key the verifier SHOULD report the condition and MUST treat the guarantee as conditional.

Where a verifier has pinned a key for a payee, a settled receipt naming that payee and carrying no attributable countersignature MUST be reported (MUST-T4-14): a countersignature that failed to verify, or verified under some other key, is discarded under Section 6.1 and leaves the expectation open exactly as a missing one does. The discarded object itself is a warning, never a failure of the receipt it rode beside; Section 6.1 states the invariant. Where the pinned payee key can be read, the verifier tries that key first. A countersignature that verifies under the pin stays approval when the carried PEM was rewritten: the rewrite is carried-key-mismatch, the guarantee is conditional because of that warning, and countersign-missing does not open, so the receipt stays in the approved set. A signature that fails the pin and verifies under the carried key is countersign-key-mismatch and is not approval. A signature that fails both is countersign-bad. When the pin cannot be read, the carried key is what is tried. That is not reported as trust-key-unreadable. A signature that verifies under the carried key is countersign-key-mismatch, one that does not is countersign-bad, and countersign-missing stays open either way (Section 7.3.1).

11.3. The decision root

A Decision Token is issued by the policy decision point and consumed by the same deployment. A consumer MUST verify a Decision Token against its own issuing key and MUST NOT accept one it cannot check that way (MUST-T6-6).

11.4. The manifest root

A verifier that is presented with a Trade Manifest MUST obtain the publisher's public key out of band and MUST verify the manifest signature against that key, not against a key the manifest carries (MUST-T4-15). A verifier without such a key that is presented with a Trade Manifest MUST report the completeness guarantee as conditional and SHOULD report the condition; the identifier unauthenticated-manifest is used for it in this document. An audit presented with no Trade Manifest is not made conditional by this requirement.

A pinned manifest key the verifier cannot decode is a fault in its own configuration and MUST be reported as trust-key-unreadable rather than as a mismatch, on the same terms as MUST-T4-11. Under a pin that cannot be read, the terms and the hash grammar continue to be read from the payload. A coseHex that is missing, null, or not hex leaves this report in place; it is not presented-object-malformed. A named refusal of that coseHex is named in the detail. A manifest whose COSE signature does not verify against a readable pin MUST be reported as manifest-key-mismatch and MUST fail the audit. A named refusal of that object is the same code, and the refusal is named in the detail. A signature that does verify, while the unsigned PEM differs, is carried-key-mismatch and the manifest stays attributed (Section 7.3). A signature that does verify, while the presented body differs from the decoded payload, is manifest-body-mismatch, a warning: the manifest stays attributed and the terms are the payload. With no pin, amount, currency, expiry, payee and acceptanceCriteriaHash are read from the COSE payload, and that body difference is not reported, nor is its content type read. The hash grammar of acceptanceCriteriaHash and ap2MandateHash is that payload. It is not checked when the payload does not decode, or when a stated publisher pin refuses the manifest. A JSON body that differs from that payload does not raise manifest-terms-mismatch or delivery-mismatch.

A verifier presented with a Trade Manifest MUST compare the manifest hash to the manifestHash of the receipts presented to the audit and MUST report a manifest that no presented receipt references (MUST-T4-17); the identifier manifest-covers-no-receipt is used for it in this document, and the completeness guarantee is conditional. The comparison runs against those presented receipts, including aborted ones, and is made before any extract window is applied and before any issuer key is applied; a hash on an aborted receipt, on a receipt outside the extract window, or on a receipt no pinned key attests still counts as a reference. This requirement asks whether any receipt names the terms, not whether a settlement in the window was made under them, and not whether the receipt that names them is attributable, so a forged receipt can silence this warning; the report it leaves behind is still conditional and still carries the finding that the receipt answers to no pinned key. This requirement does not reach the audit presented with no Trade Manifest, which remains a deployment choice under MUST-T1-2.

Naming a manifest is not obeying one. A verifier presented with a Trade Manifest MUST compare the amount, the currency and the settlement time of every receipt that names it against the manifest's amount, currency and expiry, and MUST report a receipt that departs from them (MUST-T8-9); the identifier manifest-terms-mismatch is used for it in this document. Every receipt that names the manifest is measured, aborted ones included. The time compared is the receipt's timestampMs, against the boundary MUST-T3-3 states: strictly after expiresAtMs departs, exactly at it does not. Amount and currency are compared on the exact-octet terms of MUST-T8-2.

Where a usable issuer key is pinned, the comparison is made over the receipts that verify under it and the audit fails. Where none is pinned, the departure is still reported and the audit does not fail on it alone. An issuer key is usable when the pinned issuer root holds at least one key the verifier can decode. A pinned root none of whose keys decode is already trust-key-unreadable and attests nothing, so the comparison takes the unpinned branch while that finding stands; the audit has failed on the configuration fault, and the departure is still reported without becoming a charge no readable key backs. Only receipts that name the manifest are measured against it. Under a usable issuer pin, a departure is a finding rather than a condition on the guarantee.

A policy decision point presented with a Trade Manifest it cannot attribute MUST refuse the payment rather than settle and record the doubt (MUST-T4-16): a settled payment carrying the hash of terms nobody authorised cannot be withdrawn by reporting it afterwards.

11.5. What the roots do not cover

A verifier that supplies none of these roots is not making an error, and this document does not require it to. It is making a weaker statement, and the guarantee it reports must say so. With no issuer key nothing distinguishes one submitted receipt from another, so conditions computed across the submitted set - two receipts claiming one settlement reference, for instance - cannot be attributed to anyone and are reported as conditions of the submission rather than as failures of a party; the finding stands, only its attribution changes. Three findings change severity with it, duplicate-ref, duplicate-nonce, and manifest-terms-mismatch: without a usable issuer key they are warnings and do not by themselves fail the audit (the last row of the table in Section 11.1). A finding the extract founds keeps its severity: two receipts claiming one reference still fail the audit in step 9 when the receipted total differs from the settled total.

12. Reconciliation

Completeness is the property that, given an authenticated rail extract, every settlement in the extract has a matching settled Spend Receipt, every settled receipt has a matching settlement, receipt and checkpoint hash chains verify, and checkpoint totals equal the sum of settled receipts in the checkpoint window. If a spend occurred without a receipt, the missing receipt is itself the evidence (MUST-T10-2).

The property is stated over a population, and the extract is what declares it: one account, on one rail, over one window (Section 10). "Every settlement" means every settlement that extract carried. A settlement path no presented extract covers is not reconciled and not found missing - it is outside the population - so the report names the account, rail and window it was computed over (MUST-T10-19), and a verifier that stated none of them says so instead (MUST-T10-18).

A checkpoint published with its totals withheld ([CEDULON-CHECKPOINT], Checkpoint claims) cannot contribute the last of those to the property. It is not a violation of completeness and it is not a demonstration of it either: the comparison was not made, and a result that rests on a comparison nobody made is conditional (MUST-T11-12).

12.1. Verification algorithm

A verifier MUST perform all of these steps and MUST report every finding they produce (MUST-T10-1), with one exception stated in step 6: the receipt-chain walk reports only the first break. Two receipts the links cannot place produce one receipt-chain-break. The steps are numbered for reference, not to require an evaluation order: no step short-circuits another, and an implementation may evaluate them in any order that produces the same set of findings.

Two data dependencies limit that freedom, because "any order" read naively would break them. An order that runs a step before the step it consumes does not produce the same set of findings and is not permitted.

The first is the index of refs: step 7 builds it, and steps 8 and 9 reconcile it.

The second is the issuer pin. The step that resolves it decides the coverage set and the diagnostic set defined in Terminology. Settlement indexing and reconciliation (steps 7 through 9 and the MUST-T8-9 comparison) consume the coverage set. Refusal naming and genesis, epoch, and window continuity consume the diagnostic set; checkpoint totals, receiptCount, and chainHeadHash compare each checkpoint only against receipts of that same set. A refused object counts for nothing whether or not a key is pinned (Appendix B): the pin decides who signed, and a refusal is decided before that question is asked. The chain walk in step 6 consumes the coverage set plus one addition named in Section 11.1: a receipt that claims the pin and fails to verify under it is walked so the break can be named, and is attested nowhere. A receipt that neither claims the pin nor verifies under it is reported once (issuer-key-mismatch) and then excluded, which is what keeps the settlement it names visible as uncovered (MUST-T4-10); an implementation that let it back into any of those steps would let a forged receipt cover a settlement, satisfy a checkpoint count, or invent a terms charge. Two checks deliberately stay on the presented set whatever any key says, and MUST NOT acquire the dependency: MUST-T4-17, which asks whether a manifest was named at all, and the per-receipt defect checks that ask what a receipt says about itself.

Checkpoint and witness verification consumes that working set and is specified in [CEDULON-CHECKPOINT] (Verification algorithm), which an implementation of this audit also implements: a receipt that falls in no window of a checkpoint in the working set, including every receipt when the working set holds no checkpoint, fails that document's window-coverage check (MUST-T11-7, MUST-T11-8). Epoch numbers of the working set MUST be consecutive integers, and adjacent windows of that set MUST meet at endMs = next.startMs (MUST-T11-8). An audit that presents receipts therefore presents the checkpoints that cover them; receipt and extract verification without checkpoints does not produce a passing audit. An audit given no receipts and no checkpoints rests on the extract alone (Section 11.1).

A stream of receipts usually begins before the window under audit, and its chain has to be anchored somewhere. Without an anchor checkpoint it is anchored at its genesis: the checkpoint with the lowest epoch in the working set, which under a usable pinned issuer key is the attested set, is the genesis checkpoint of [CEDULON-CHECKPOINT] and its prevCheckpointHash is null, and a presented checkpoint outside the working set does not change which checkpoint that is, whatever its epoch. The first receipt's prevReceiptHash is then null (step 6), and auditing window N means presenting every receipt and checkpoint from the stream's first. An audit MAY instead present an anchor checkpoint (MUST-T11-20 of [CEDULON-CHECKPOINT]): the issuer-signed epoch checkpoint immediately preceding the checkpoint with the lowest epoch in the working set. An anchor checkpoint is a checkpoint of this issuer's own chain; it is not the Transparency Service of Section 3.3, and registering a statement with one anchors no chain here. MUST-T11-20 makes an anchor checkpoint valid only when it answers to the issuer root, so it is resolved against a usable pinned issuer key and against nothing else. With no issuer key pinned there is no root for it to answer to: the key it carries verifies any checkpoint its holder minted and is not a fallback (MUST-T4-11), so the anchor checkpoint anchors nothing, the chain is walked from its genesis, and the condition is reported as unauthenticated-issuer, identified by anchor. A stated issuer pin that cannot be read likewise leaves it unused. An uppercase coseHex anchor under a readable pin is a decoder refusal, checkpoint-total-mismatch identified by anchor together with hex-not-lowercase, not issuer-key-mismatch. The chain breaks only when it depends on the ignored anchor. A pinless unnecessary anchor on a genesis chain does not break it. Under a usable pin, one that does not verify is issuer-key-mismatch, identified by anchor, and anchors nothing; and because the lowest epoch is taken in the working set, which under that pin is the attested set, a checkpoint that does not answer to the pin cannot make an anchor checkpoint adjacent. The anchor checkpoint is valid when, in addition, its epoch is one less than that checkpoint's, its endMs equals that checkpoint's startMs, and that checkpoint's prevCheckpointHash equals the anchor checkpoint's hash; a failure of any of these is reported as window-coverage, identified by anchor, and the anchor checkpoint anchors nothing. With a valid anchor checkpoint, the checkpoint with the lowest epoch in the working set is not a genesis checkpoint and its prevCheckpointHash is checked against the anchor checkpoint rather than against null, and the first receipt's prevReceiptHash is checked against the anchor checkpoint's chainHeadHash (step 6). The anchor checkpoint's own window is not audited: its totals, count and head are not compared, and it covers no presented receipt. What happened before it is the business of the audit of that earlier window.

When a step names an identifier in backticks, that identifier SHOULD be used for the condition in diagnostic output. The normative requirement is the behaviour: report the condition, identified by the ref or other handle given in the step. The identifiers are not an interoperability surface.

  1. Establish the subject of the audit. When an extract is supplied, the settlement records it carries are the ones reconciled; a settlement list from any other source MUST NOT be substituted for them (MUST-T10-12). If the caller supplies both and they differ, the verifier MUST report that the caller-supplied list disagrees with the extract, and MUST still reconcile the extract. The identifier extract-settlement-mismatch SHOULD be used for this condition in diagnostic output. Two rows are the same row when the JSON array of ref, amount, currency, and timestampMs is the same. A U+0000 inside one field does not join the fields, so two rows that differ only by where that character sits are not equal. An empty caller list beside an extract that carries rows is extract-settlement-mismatch: the lists differ, and the audit continues on the extract. A non-empty caller list on the MCP cedulon_audit entry is the early refusal extra-settlements-with-extract and does not reach this step. An empty extraSettlements list is accepted and is not that refusal. audit() with any other list continues on the extract.

  2. Verify the extract signature against the out-of-band rail key (MUST-T10-8, MUST-T10-9). If no key is pinned, the check that runs is against the key the extract carries, which establishes internal consistency and not origin; the verifier MUST still compute it, MUST NOT read it as a statement about who produced the extract, and MUST treat the completeness guarantee as conditional (MUST-T10-7). The identifier unauthenticated-extract SHOULD be used for this condition in diagnostic output, whatever the extract carries. If a key is pinned and cannot be decoded, the verifier MUST report that the pinned key is unreadable. The identifier trust-key-unreadable SHOULD be used for this condition. If a key is pinned and the signature does not verify under the carried Ed25519 key, or that key's SubjectPublicKeyInfo differs from the pin, the verifier MUST report that the extract is not signed by the pinned key. This stands even when the signature bytes would verify under the pin. The identifier extract-key-mismatch SHOULD be used for this condition. The rows of an extract the pin refused are not reconciled against the receipts, and no settlement finding is read out of that document (MUST-T10-20); the identifier settlement-comparison-skipped SHOULD be used to say that the comparison did not run. The same holds, with or without a pin, for an extract body a refusal of Appendix B refused: the refused object is not counted, so its rows are not reconciled and settlement-comparison-skipped names the refusal. An unpinned extract whose signature merely fails against the key it carries is not refused and is still reconciled, under a conditional guarantee. A finding that puts the extract itself in doubt MUST prevent an unconditional guarantee.

  3. Check scope. The verifier MUST report each settlement record whose timestampMs falls outside the declared window, identified by that record's ref (MUST-T10-10). When the verifier states an expected account, rail, or window, it MUST report an extract that does not cover it (MUST-T10-11). The identifier extract-scope-mismatch SHOULD be used for both conditions. If the verifier pinned a rail key and stated no period, it MUST treat the guarantee as conditional (MUST-T10-15). The identifier unstated-audit-window SHOULD be used for this condition. If it pinned a rail key and stated no account or no rail, it MUST treat the guarantee as conditional for the same reason (MUST-T10-18); the identifier unstated-audit-scope SHOULD be used. With no rail key pinned, neither is reported: the condition is unauthenticated-extract (step 2), which already makes the guarantee conditional. Whatever the verdict, the report MUST name the account, rail and window the extract declared, in every structure it returns for the audit (MUST-T10-19).

  4. Resolve each Spend Receipt against the issuer root (Section 11.1) in one pass. Decode the COSE_Sign1; a decoder bound or a duplicate key is a named refusal, not a signature verdict, and the refused receipt is not counted (Finding codes, below). A content type that is not the receipt type, or a decoded claim map that does not match the presented claims, means the receipt does not verify (MUST-T4-2, MUST-T4-8). Then ask one question: does the signature verify under the pinned issuer key that kid names. Routing by kid is exclusive (Section 11.1): no other key of the set is tried, and kid carries no authority beyond choosing the key; the carried key is not consulted for membership at all. The resolution table in Section 11.1 reads the answer out per cell. Every cell there is a named condition plus a membership decision; no cell is a silent removal. Where a countersignature is present, Section 11.2 governs what it establishes (MUST-T4-13, MUST-T4-14). Where a Trade Manifest is presented, Section 11.4 governs it (MUST-T4-15). The carried key, the presented body, and coseHex under each pin state are Section 7.3.1. With a manifest that no presented receipt references, manifest-covers-no-receipt (MUST-T4-17). A receipt that names the manifest but departs from its amount, currency, expiry or, where the manifest names one, payee is reported as manifest-terms-mismatch; with a usable issuer key pinned the comparison runs over the attested receipts and the departure fails the audit, and with no usable issuer key it is a warning over the presented receipts and does not by itself fail the audit (MUST-T8-9). A receipt with noManifest true is not compared for terms or for delivery, even when manifestHash is filled and no issuer pin is held. An audit presented with no Trade Manifest is not made conditional by this step.

  5. Scope the receipts. Membership follows the ref binding first: a receipt whose ref appears on the extract is reconciled against this extract even when its own timestampMs falls outside the declared window - the rail has signed that the settlement belongs to the window, and the receipt follows its settlement. The timestampMs sieve applies only to receipts the extract does not name: such a receipt outside the window is not a completeness failure against this extract (MUST-T10-16); auditing a longer period requires extracts that cover it. At the window's edges the declared allowance applies (Section 10). The window is half-open, from windowStartMs inclusive to windowEndMs exclusive, and a timestampMs t is within clockSkewMs of an edge by the predicates in Section 10: t < windowStartMs + clockSkewMs at the opening edge, t >= windowEndMs - clockSkewMs at the closing edge, with no far-side cap. An allowance of zero defers nothing: a timestamp equal to windowEndMs is extract-scope-mismatch and, when unmatched, settlement-without-receipt, not boundary-deferred. An unmatched settled receipt, and an unmatched settlement record, within clockSkewMs of either edge are reported as boundary-deferred, a warning, rather than as step 8's completeness findings. The rail settles before the issuer signs, so an honest payment can put its settlement on one side of an edge and its receipt on the other, and two honest clocks can also disagree by less than the allowance; both verifiers of such a payment would otherwise reach the same false accusation (MUST-T10-17). That report is the general rule. The exceptions follow in this order of precedence, and the first that matches is the only outcome. A settled receipt with a null rail ref is not deferred: no row of any extract can name it, so it is step 8's completeness finding at either edge. A signed neighbour extract that verifies, abuts, and carries no row hardens the deferred receipt to receipt-without-settlement. A neighbour whose every row falls outside its own window leaves the receipt boundary-deferred. The single-window warning stands when the adjacent extract is not presented. Where the following window's extract is presented and verifies, a receipt deferred at the closing edge whose ref appears on it is resolved and not reported. One whose ref does not appear hardens into the step 8 finding when that neighbour has a row inside its own window. Where the previous window's extract is presented and verifies, the same holds for a receipt deferred at the opening edge. An adjacent extract is used only when it carries the account and rail of the presented extract and its window abuts this one - the following window's extract starts at windowEndMs, the previous window's extract ends at windowStartMs - and only for the rows inside its own declared window; one that does not is reported as extract-scope-mismatch and resolves nothing. A record in both the inner band and the outer band of a two-window run stays pending, and that run can still succeed. An inner-edge settlement record that sits in an inner band and in no outer band resolves when the adjacent window carries a receipt for its ref through that window's facing band, and is otherwise the completeness finding. Consecutive windows tile by exact startMs and endMs: a window of [0, 20) does not cover an expected window of [0, 19), and that run is extract-scope-mismatch. An adjacent extract names a deferred receipt only through a row in its band facing this window - within clockSkewMs of the shared edge, by this audit's allowance - whose ref, amount and currency equal the receipt's. Any other row with that ref is a settlement the adjacent window reconciles for itself, and counting it here as well would let one settlement cover two receipts across the edge. A receipt within clockSkewMs of both edges, in a window shorter than twice the allowance, is resolved by either adjacent extract that names its ref; when neither does, either one that is presented and used hardens it. A deferred settlement record at either edge is reconciled against any receipt in the presented bag that names its ref, whatever that receipt's timestamp, and no extract hardens it. Receipts remain subject to every other check regardless of window.

  6. Walk the receipts of the working set, together with any receipt that claims the pin and failed to verify under it (Section 11.1), in issuer order. Issuer order is the order induced by the prevReceiptHash chain: the verifier rebuilds the chain from the links, and the order in which receipts were presented carries no weight. timestampMs is issuer-asserted and is not an ordering source. The first prevReceiptHash MUST be null, or, where a valid anchor checkpoint is presented, MUST equal its chainHeadHash. That hash is null when the anchor's own window contains no receipt; it is not null merely because this window's first receipt has no predecessor in the presented bag. An honest uninterrupted chain anchored on that empty epoch yields receipt-chain-break: the anchor's chainHeadHash is null and does not carry the previous receipt head ([CEDULON-CHECKPOINT]). Each later prevReceiptHash MUST equal receiptHash of the previous receipt. A miss, and a receipt the links cannot place, MUST be reported as a break in the receipt chain. The identifier receipt-chain-break SHOULD be used for this condition. Only the first break is reported. An issuer stream that does not chain its receipts (SHOULD-T4-5) is therefore reported as a break from its second receipt on: the SHOULD states what an issuer owes, and this step states what a verifier does with a stream that did not.

  7. Index the settled receipts of the working set and the extract records by ref. A ref that appears more than once on either side MUST be reported as a repeated reference (MUST-T10-6). The identifier duplicate-ref SHOULD be used for this condition. On the receipt side its severity follows the two branches of MUST-T8-9: with a usable issuer key pinned, a ref repeated among the attested receipts fails the audit; with none, a ref repeated among the presented receipts is a warning and does not by itself fail the audit. A ref repeated on the extract side fails the audit either way. Step 9 adds the amount comparison for a repeated ref that has records on both sides, in both of those pin cases, and does not replace step 8 when the other side has no record. A nonce that appears on more than one settled receipt of the issuer is checked in this same step, before the time sieve, and reported as duplicate-nonce (MUST-T10-21), except where those receipts also share one ref and duplicate-ref already reports them.

  8. For each ref that appears exactly once on each side, require a one-to-one match on ref AND amount AND currency (MUST-T10-1), compared as exact octets on the terms of MUST-T8-2. The one-to-one comparison of this step reads no amount as a number. Step 9, and the checkpoint totals, which are outside this step, do read an amount as a number. Amount or currency mismatch MUST be reported as a settlement that does not match its receipt, identified by that ref. The identifier settlement-mismatch SHOULD be used for this condition. A settlement with no receipt MUST be reported as lacking a receipt, identified by its ref (MUST-T10-2). The identifier settlement-without-receipt SHOULD be used for this condition. A settled receipt with no extract row MUST be reported as a completeness failure (MUST-T10-3). The identifier receipt-without-settlement SHOULD be used for this condition. MUST-T10-2 and MUST-T10-3 apply to every settlement record and every settled receipt, whether or not its ref repeats. A repeated ref whose other side has no record at all takes these findings, whatever the amounts. Step 9 adds the amount comparison for a repeated ref that has records on both sides and does not replace them. The window sieve (MUST-T10-16) and the boundary allowance (MUST-T10-17) apply to these records as they do to a single ref. This runs when no extract was presented, and when an extract was presented and not refused: with no extract, no settled receipt has an extract row, so each is reported this way and the audit fails. It does not run for an extract whose body was refused by name. That case is settlement-comparison-skipped (step 2): the rows are not reconciled, the uncovered receipts are not then charged, and with no rail pin the audit can still succeed with a conditional guarantee. A settled receipt claims a settlement, and an audit given nothing to show it is not a passing audit of it. The settlement side has no population to read in that case, which is all MUST-T10-19 says about it. A bare settlements list presented with no extract is a simulation input of the companion tooling. It can return balanced or conditional. The sentence above does not apply to that input. The normative rail audit uses an extract. A settled receipt with a null rail ref MUST be reported as settled without a rail reference; this check asks what a receipt says about itself and runs over the presented receipts, attested or not. The identifier settled-without-ref SHOULD be used for this condition. Where a settlement record declares a beneficiary (Section 10), it MUST be compared against the matched receipt's payee as exact octets; a difference is beneficiary-mismatch and fails the audit. Where an extract was presented, and neither the manifest's signed payload names a payee nor any settlement record declares a string beneficiary, the report MUST carry counterparty-unbound, a scope record. It is raised whether or not the row comparison ran and whether or not the audit failed. It is not raised when no extract was presented. A payee on the signed payload, including a payload the publisher pin refused, or any row that declares a string beneficiary, suppresses it. A payee that exists only on a JSON body that differs from the payload does not. The record does not prove identity. Its text names the absence of a payee and of a beneficiary in the presented evidence. It does not say that a row was reconciled, and it does not say that ref, amount, and currency tie settlements to receipts. It does not move the verdict and does not by itself make the guarantee conditional.

  9. Step 8 already reports MUST-T10-2 and MUST-T10-3 for a repeated ref whose other side has no record at all. This step does not replace those findings. It adds an amount comparison for a repeated ref that has records on both sides (MUST-T10-13). The duplicate finding does not drop that ref from the comparison, and it does not by itself run the sum when one side has no record. An out-of-window copy of the ref is not, by the duplicate report alone, a member of the sum. For each currency under that ref, compare the total settled against the total receipted. A settled total that exceeds the receipted total MUST be reported as a settlement lacking a receipt, and the finding MUST state the unaccounted amount. The identifier settlement-without-receipt SHOULD be used for this condition. A settled total that is less than the receipted total MUST be reported as a settlement that does not match its receipt, identified by that ref. The identifier settlement-mismatch SHOULD be used for this condition. An amount on a repeating ref that cannot be parsed as an integer MUST be reported without abandoning the audit, whether or not the other side has a record; the identifier malformed-amount SHOULD be used for this condition. A verifier MUST still report findings for the remaining records.

  10. Aborted receipts are not matched to extract rows and are not added to totals.

  11. If any finding remains that is not a warning (a warning is a condition that only makes the completeness guarantee conditional), the audit MUST fail (MUST-T10-4).

12.2. Finding codes

The identifiers are listed in Appendix B. They are for diagnostic output. They are not an interoperability surface. A finding object that can be carried on the wire is outside the scope of this document and may be defined later. Two implementations interoperate when they accept the same inputs and fail or warn on the same conditions, not when they print the same strings.

A condition that makes the audit fail is a finding. A condition that only makes the completeness guarantee conditional is a warning. Warnings MUST still appear in operator-facing output (MUST-T10-14).

A third kind of condition comes before either: a refusal, an input the verifier will not read at all, decided before any verdict on what the input says. A decoder bound (MUST-T4-19), a duplicate CBOR key (MUST-T4-18) or JSON member name (MUST-T4-20), a non-empty unprotected header (MUST-T4-21), CBOR that is not in the deterministic encoding, and a Rail Extract body whose required members are missing or out of range (Section 10) are refusals. A refusal MUST be reported by name, except where this algorithm states that the name is dropped. An issuer pin that cannot be read does not name each decoder refusal on the empty coverage walk. More than ten foreign receipts collapse under one issuer-key-mismatch whose id is receipts, and the individual names are not repeated. The refused object is not counted: it is attested nowhere, covers no settlement and no checkpoint window, and adds to no total. For a receipt or a checkpoint, whatever that absence leaves uncovered is reported by the steps that would have counted it. A Rail Extract body is the exception. With or without a rail pin, a named refusal of its body skips reconciliation (settlement-comparison-skipped, step 2) and does not then charge the receipts the rows no longer cover. With no rail pin that audit can succeed, and the guarantee is conditional. accountId absent is that case. A settlements value that is not an array, or a row that is null, is read before the shape helper and the audit fails as presented-object-malformed instead. An audit input or a verifier configuration that the verifier cannot read at all is not a refusal of one object: the audit is not carried out, and the report fails with presented-object-malformed as its only finding, with one exception, which returns no report at all: audit-too-large. It is raised, before any object is read, for an audit (each window, in a run of consecutive windows) that presents more than 4096 Spend Receipts, more than 4096 settlement records in any one extract or caller-supplied settlement list, more than 256 checkpoints, or more than 4096 witness receipts. These bounds are the reference implementation's and are coarser than the per-object floor of Section 7.3.3; an implementation MAY choose others, and MUST document the ones it applies. audit-too-large is not a finding, is not one of the refusals of Appendix B, and carries no verdict on the presented objects: the caller splits the window and audits again. A content type that is not the expected one, and a decoded claim map that does not match the presented claims, are not refusals: the object does not verify, and the row of the table in Section 11.1 that its kid selects applies. The refusal identifiers are listed in Appendix B.1.

A finding that blocks an unconditional guarantee is extract-key-mismatch, trust-key-unreadable, extract-scope-mismatch, extract-settlement-mismatch, issuer-key-mismatch, manifest-key-mismatch, or presented-object-malformed. The first four put the extract itself in doubt. manifest-key-mismatch, and trust-key-unreadable on the manifest pin, put a presented Trade Manifest in doubt. issuer-key-mismatch puts a receipt, a checkpoint, or an anchor in doubt. presented-object-malformed means the input could not be read as a report at all. Any finding in that list MUST prevent an unconditional guarantee, not merely fail the audit.

An unconditional guarantee therefore requires all of: an extract, a pinned rail key the extract's signature verifies against, a stated account, a stated rail, a stated period the extract covers, an issuer root for whatever receipts and checkpoints are presented, a manifest root for whatever Trade Manifest is presented, none of the findings named above, and no warning that withholds part of the comparison. A scope record such as counterparty-unbound is not one of those warnings. A checkpoint whose totals were signed as withheld (checkpoint-totals-redacted) removes a comparison the guarantee rests on, and a presented checkpoint a supplied witness does not hold (checkpoint-not-anchored) leaves part of the chain unwitnessed. Either one makes the result conditional. Anything less than the whole list is conditional, and the report MUST say so.

An implementation MUST make the guarantee and any warnings visible in whatever human-readable audit report it produces under this document, not only in a returned structure (MUST-T10-14). A report that says the books balance while withholding that the balance is conditional invites the reader to take a conditional result for an unconditional one.

Checkpoints SHOULD be registered with a Transparency Service (SHOULD-T11-5). A test deployment MAY use an in-process append-only log as the witness (MAY-T11-6). Cedulon still MUST NOT take custody.

The guarantee named above is about completeness against the extract, which is the subject of T10. It is not a claim that no checkpoint was suppressed. Suppression is the subject of T11, and a report MUST NOT be read as settling it when no witness was consulted: with no witness receipts, the presented chain is self-consistent by construction and says nothing about what it left out (MUST-T11-9). A verifier that consulted a witness and found every presented checkpoint recorded, with nothing recorded that was not presented, has discharged T11 for the period those receipts cover, and for no longer. A list of witness receipts presented empty is a supplied list, not an absent one. The empty list alone is witness-inclusion-not-exercised. It does not prove that a query was made or that the log is empty. The same empty list beside a tier-2 pair does not raise that warning; the pair is witness-inclusion-invalid when it fails (MUST-T11-19).

13. Policy Semantics

Policy is default deny. The engine understands three families of rule:

Fail-closed: missing engine, crash, or exception yields deny (MUST-T2-3). Implementations SHOULD emit stable reason codes (SHOULD-T2-5). Decision tokens SHOULD expire after a short time-to-live (TTL) (SHOULD-T6-3).

The agent-facing spend interface MUST invoke the PDP and MUST NOT expose a parallel ungated rail call to the model (MUST-T5-1).

One boundary is stated here rather than left to be inferred. In the retrospective audit, "allowed by policy" is the Receipt Issuer's signed assertion: the spend passed the issuer's gate under the policyHash the receipt names. The Decision Token is consumed at the gate, and the verification algorithm never sees it; the audit does not independently re-verify the PDP's allow. The completeness side of the audit has an independent leg - the rail extract - and the policy side deliberately does not: that is a trust boundary of this profile, not an oversight. A deployment that wants the policy answer to be independently verifiable needs a receipt-to-token binding, which this document does not define; adding it would change what a receipt carries.

14. Privacy Considerations

A public transparency encoding MUST support omitting or hashing payer and payee identifiers and MUST support amount redaction or bucket encoding (MUST-T9-1). Implementations MUST NOT write government-ID numbers, the Primary Account Number (PAN) of a payment instrument, or street address into a public statement (MUST-T9-2). Default statements registered with a public Transparency Service SHOULD publish policyHash, manifestHash, receiptHash, and timestampMs rather than full claims (SHOULD-T9-3). A private auditor MAY receive an unredacted receipt out of band (MAY-T9-4).

The paragraph above counts receipt fields. A checkpoint publishes something a receipt does not: a per-currency total for a whole window, which discloses trading volume even when every individual receipt is redacted (MUST-T9-5).

The rule is the one [CEDULON-CHECKPOINT] defines and Section 12 applies: totals MAY be withheld by signing it as null (MUST-T11-12), and only that form counts as a redaction (MUST-T11-13). The structural claims are not redactable, because a verifier that cannot read the window or the chain head cannot check anything at all, and a checkpoint that hid them would be indistinguishable from a broken one.

When totals are withheld, a verifier that cannot recompute them says so, and the completeness guarantee for that window is conditional. A deployment that wants an unconditional result publishes the totals; a deployment that wants the volume private accepts a conditional one. What a deployment MUST NOT do is obtain the unconditional result while withholding the evidence for it.

15. Security Considerations

This section is authoritative for the protocol requirements in this document. The threat narratives in [CEDULON-THREATS] are informative and do not override it.

Requirement identifiers take the form KEYWORD-Tn-k, where KEYWORD is MUST, SHOULD, or MAY, n is the threat number in this section, and k is a sequence number within that threat. MUST-T8-custody is the custody prohibition under T8. The tables below define the requirement text those citations refer to.

15.1. T1: Prompt injection leads to unauthorized spend

An attacker plants instructions in tool output, a web page, or a retrieved document. The agent then calls a spend tool outside the principal's intent. Narrative: [CEDULON-THREATS].

Table 16
ID Requirement
MUST-T1-1 The PDP MUST decide from structured request fields and stored policy, not from model-generated prose.
MUST-T1-2 A spend that is not bound to a verified Trade Manifest MUST be marked noManifest on the Spend Receipt and MUST still be subject to limit, velocity, and scope policy.
SHOULD-T1-3 Hosts SHOULD require a human confirmation channel for first-use payees.
MAY-T1-4 An implementation MAY refuse all noManifest spend.

15.2. T2: Runaway agent (loop spend)

A stuck tool loop or recursive planner issues many payments. Velocity and cumulative-limit counters live in the PDP, fail-closed. Narrative: [CEDULON-THREATS].

Table 17
ID Requirement
MUST-T2-1 Policy MUST express a maximum payment count per configured time window (velocity).
MUST-T2-2 Policy MUST express a maximum amount per payment and a maximum cumulative amount per window.
MUST-T2-3 If the PDP is unreachable, uninitialized, or throws during evaluation, the spend MUST be denied (fail-closed, default deny).
MUST-T2-4 A denied attempt MUST NOT increment the allowed-spend counters as if it had succeeded.
SHOULD-T2-5 Implementations SHOULD emit a stable reason code for velocity and limit denials.

15.3. T3: Replay of payment authority

An observer replays a signed payment payload, mandate, or Cedulon decision token. Every gated spend carries a unique nonce; manifests expire; tokens are single-use. Narrative: [CEDULON-THREATS].

Table 18
ID Requirement
MUST-T3-1 Every spend attempt that the PDP allows MUST include a nonce that the implementation has not accepted before.
MUST-T3-2 A second attempt that reuses a nonce MUST be denied.
MUST-T3-3 A Trade Manifest MUST carry an expiry; a spend against an expired manifest MUST be denied. The manifest is expired when the settlement time is strictly greater than expiresAtMs; a settlement at exactly expiresAtMs is within the manifest.
MUST-T3-4 A PDP allow decision MUST be bound to the SHA-256 of the canonical encoding of the request fields it evaluated, as stated in Section 8.1, and MUST be single-use.
SHOULD-T3-5 Nonce stores SHOULD persist across process restart when the deployment is not a test fixture.

15.4. T4: Receipt forgery or repudiation

A party alters a receipt, invents a receipt, or denies a real spend. Receipts are signed; verification covers the signed bytes; a hash chain links them. Ed25519 offers no protection against a cryptographically relevant quantum computer, and [CEDULON-PQ] adds an ML-DSA-87 signature alongside it. Narrative: [CEDULON-THREATS].

Table 19
ID Requirement
MUST-T4-1 A Spend Receipt MUST be signed by the Receipt Issuer over the deterministic CBOR encoding of its claims, as profiled in Section 7. The phrase "canonical encoding" is reserved for JSON documents (Section 8).
MUST-T4-2 Verifiers MUST reject a receipt whose signature does not validate or whose decoded claim map does not match the presented claims.
MUST-T4-3 A Spend Receipt MUST include payer, payee, amount, currency, policyHash, timestampMs, and nonce.
MUST-T4-4 A Spend Receipt MUST include manifestHash or an explicit noManifest flag, never an ambiguous empty hash. Empty optional values are CBOR null; labels are never absent.
SHOULD-T4-5 Receipts SHOULD form a hash chain (prevReceiptHash) so omission is detectable within one issuer stream.
MAY-T4-6 Parties MAY register the signed receipt as a SCITT statement to obtain a COSE receipt.
MUST-T4-7 A Spend Receipt MUST include outcome (settled or aborted). A settled receipt MUST have a non-null rail ref. Aborted receipts MUST NOT enter checkpoint totals.
MUST-T4-8 COSE_Sign1 protected headers MUST use alg -19 (Ed25519), a mandatory kid, and a payload-specific content type. Verifiers MUST reject a kid that does not match the configured issuer key.
MUST-T4-9 A verifier MUST obtain the issuer public key out of band and MUST verify Spend Receipt and epoch checkpoint signatures against that key. A key carried by the object MUST NOT be treated as the signer's identity and MUST NOT be used as a fallback where no key was obtained (MUST-T4-11). A verifier without such a key that is presented with any Spend Receipt or epoch checkpoint MUST report the completeness guarantee as conditional. An audit presented with neither rests on the extract alone and is not made conditional by this requirement.
MUST-T4-10 A receipt that does not verify against the pinned issuer key MUST NOT count as coverage for the settlement it names, and that settlement MUST still be reported as uncovered. Reporting the mismatch is not sufficient on its own.
MUST-T4-11 Pinned issuer keys MUST be compared by SubjectPublicKeyInfo DER encoding. A pinned key that cannot be decoded MUST be reported as a verifier configuration fault rather than as a mismatch, and where no pinned key decodes, the verifier MUST NOT fall back to the keys the objects carry.
MUST-T4-12 A verifier MUST accept an issuer, publisher, witness, or rail root comprising more than one key, so that a key rotation inside the audited window does not require it to abandon pinning.
MUST-T4-13 A payee countersignature MUST NOT be treated as evidence of payee approval unless it verifies against a payee key the verifier obtained out of band.
MUST-T4-14 Where a verifier has pinned a key for a payee, a settled receipt naming that payee and carrying no attributable countersignature MUST be reported.
MUST-T4-15 A verifier that is presented with a Trade Manifest MUST obtain the publisher public key out of band and MUST verify the manifest signature against that key, not against a key the manifest carries. A pin that cannot be read, a readable pin the signature does not verify under (the value signed by another key), a carried PEM that differs, and a presented body that differs are Section 7.3.1. A verifier without such a key that is presented with a Trade Manifest MUST report the completeness guarantee as conditional. An audit presented with no Trade Manifest is not made conditional by this requirement.
MUST-T4-16 A policy decision point presented with a Trade Manifest it cannot verify against a key supplied out of band MUST refuse the payment.
MUST-T4-17 A verifier presented with a Trade Manifest MUST compare the manifest hash against the manifestHash of the receipts presented to the audit, including aborted ones, before any extract window is applied and before any issuer key is applied, and MUST report a presented manifest that no presented receipt references. An audit presented with no Trade Manifest is not made conditional by this requirement.
MUST-T4-18 A decoder MUST refuse a CBOR map that carries a duplicate encoded key.
MUST-T4-19 A decoder MUST impose a bound on encoded size, nesting depth, and the number of elements it will decode from an audit input, and MUST refuse an input that exceeds a bound with a named refusal rather than by exhausting memory or the stack. It SHOULD document the bounds it applies. An otherwise conforming input within the floor fixed in Section 7.3.3 (65536 encoded octets, 16 levels of nesting, 4096 elements, 16384 octets in a string) MUST NOT be refused solely because of resource bounds, so that two conforming verifiers do not differ over the same input on size alone.
MUST-T4-20 A verifier that receives a JSON document as text MUST refuse a text in which any object repeats a member name, by name (json-duplicate-key), before parsing it. A verifier handed an object rather than text cannot apply this rule and MUST NOT report that it did.
MUST-T4-21 A decoder MUST refuse a COSE_Sign1 message whose unprotected header is not an empty map, by name (cose-sign1-unprotected), rather than verifying the signature and ignoring the header.

15.5. T5: Policy bypass via direct rail access

The agent or an attacker calls the rail without the PDP. The only payment function is the adapter that calls the PDP first. Narrative: [CEDULON-THREATS].

Table 20
ID Requirement
MUST-T5-1 The agent-facing spend interface MUST invoke the PDP and MUST NOT expose a parallel ungated rail call to the model.
MUST-T5-2 Rail credentials, wallet handles, and facilitator tokens MUST NOT be placed in tool results or prompts.
SHOULD-T5-3 Hosts SHOULD run the PDP and signing keys in a process the model runtime cannot write.
MAY-T5-4 A deployment MAY use OS or hardware isolation between the model and the PDP.

15.6. T6: Time-of-check to time-of-use (TOCTOU) between policy check and payment

An allow is computed; the request is then swapped before the rail sees it. Settlement pays only the exact fields hashed into the single-use decision. Narrative: [CEDULON-THREATS].

Table 21
ID Requirement
MUST-T6-1 Payment settlement MUST use the same six requestHash fields the PDP evaluated: amount, currency, payee, tool, nonce, and manifestHash.
MUST-T6-2 An allow decision MUST be consumed on the first settlement attempt, success or fail-closed abort, and MUST NOT authorize a later different request.
SHOULD-T6-3 Implementations SHOULD treat a decision older than a short TTL as expired.
MUST-T6-4 An allow Decision Token MUST be COSE_Sign1 with CWT private-use labels -70301..-70305 (requestHash, policyHash, expiryMs, nonce, singleUseId) and content type application/cedulon-decision+cbor.
MUST-T6-5 A party that accepts a Decision Token MUST reject a failed signature, a kid or content-type mismatch, a claim-map mismatch, or an expired expiryMs. The token is expired when the evaluation time is strictly greater than expiryMs; at exactly expiryMs it is not.
MUST-T6-6 A consumer of a Decision Token MUST verify it against its own issuing key and MUST NOT accept a token it cannot check that way.
MUST-T6-7 A party that records a settlement under a Decision Token MUST refuse it when that settlement's timestampMs is strictly greater than the token's expiryMs. At exactly expiryMs the settlement remains inside the token's authority; the boundary is the one MUST-T6-5 states.

A later verifier cannot make this comparison. Decision Tokens are not among the inputs Section 12.1 enumerates: the extract, the receipts, the manifests, the checkpoints, and the witness receipts. The rule is written on the party that can apply it. Verification does not repeat it.

MUST-T6-7 does not let a later verifier detect a settlement that predates its decision. That would require carrying the decision's issuance time on the token and binding the receipt to it, which this document does not define. MUST-T6-4 names the same five labels.

15.7. T7: Signing-key leakage

Keys leak from disk, logs, or a prompt. Forged manifests or receipts follow. Narrative: [CEDULON-THREATS].

Table 22
ID Requirement
MUST-T7-1 Secret key material MUST NOT appear in receipts, checkpoints, manifests, decision tokens, logs, or example output.
MUST-T7-2 Example and test keys MUST be generated at runtime or stored as clearly fake fixtures, never as production secrets.
SHOULD-T7-3 Production deployments SHOULD use a hardware security module (HSM) or operating-system key store and SHOULD rotate keys.
MAY-T7-4 Implementations MAY encrypt keys at rest.
MUST-T7-5 An implementation that stores a signing key in the clear MUST report the protection it actually obtained, measured from the stored object rather than derived from the platform.
MUST-T7-6 A writable directory anywhere on the path to a stored signing key makes the file permission moot, and a symbolic link on that path hands the destination to whoever placed it. An implementation MUST refuse both rather than report the key as protected.

15.8. T8: Counterparty price gouging or defective delivery

The payee ships a different artifact, or the price exceeds the signed offer. The Trade Manifest binds price and an acceptance-criteria hash before payment. Narrative: [CEDULON-THREATS].

Table 23
ID Requirement
MUST-T8-1 A Trade Manifest MUST bind goods or service description, price, currency, acceptance-criteria hash, cancel condition, and expiry.
MUST-T8-2 A spend bound to a manifest MUST be denied if the requested amount or currency differs from the manifest. Amount and currency are compared as the exact octets of their text strings: no case folding, no Unicode normalisation, no numeric reinterpretation.
MUST-T8-3 If delivery bytes do not hash to the acceptance-criteria hash, the implementation MUST be able to produce a Dispute Evidence Bundle containing the manifest, the spend receipt, and the delivery hash.
MUST-T8-4 The Dispute Evidence Bundle MUST NOT be described as an arbitral award or escrow release.
MUST-T8-7 manifestHash MUST be the SHA-256 of the signed Trade Manifest COSE bytes and MUST NOT include the issuer public key encoding.
SHOULD-T8-5 Manifests SHOULD reference an AP2 mandate hash when one exists.
MAY-T8-6 Parties MAY add an optional escrow actor as a third-party role interface outside the objects this document defines. The actor has no label in those objects. An implementation of this specification MUST NOT take custody (MUST-T8-custody).
MUST-T8-custody Implementations of this specification MUST NOT take custody of funds or operate escrow.
MUST-T8-8 If a payee countersignature is present, a verifier MUST reject it when the signature fails, when kid or content type does not match the configured payee key, or when the receiptCose value (label -70401) is not the issuer COSE_Sign1 bytes.
MUST-T8-9 A verifier presented with a Trade Manifest MUST compare the amount, currency and settlement time of every receipt that names it, aborted ones included, against the manifest amount, currency and expiry - amount and currency on the exact-octet terms of MUST-T8-2, time on the boundary of MUST-T3-3, and, where the manifest names a payee, the receipt payee on the same exact-octet terms - and MUST report a receipt that departs from them. Where a usable issuer key is pinned (a pinned issuer root at least one of whose keys the verifier can decode), the comparison is made over the receipts that verify under it and a departure MUST fail the audit. Where no usable issuer key is pinned, the departure MUST still be reported and MUST NOT by itself fail the audit. Receipts that do not name the manifest are not measured against it. A Trade Manifest that a stated publisher pin refuses is not terms for this purpose: where the verifier reports manifest-key-mismatch, it MUST NOT read a charge out of that document's body, neither this comparison nor the acceptance-hash comparison of Section 6.1.
MAY-T8-10 A payee MAY attach a separate COSE_Sign1 countersignature over the issuer receipt bytes. Absence MUST NOT invalidate the issuer receipt.
MAY-T8-11 An attributable countersignature MAY carry deliveredHash. When present, the verifier holds a Trade Manifest no pin refused, and the receipt's manifestHash names that manifest, the verifier MUST compare it with acceptanceCriteriaHash from that manifest's COSE payload as digest values - the 64 hexadecimal characters decoded to 32 octets, then octet for octet - and MUST report a mismatch as a failing finding (delivery-mismatch). The JSON body's hash is not the comparison when it differs from the payload. The comparison is not made when acceptanceCriteriaHash is not 64 lowercase hex. A receipt that is noManifest or names a different manifest MUST NOT be compared with it. A deliveredHash on an unattributable countersignature MUST be discarded with it.

15.9. Optional escrow role

Parties MAY name an escrow actor as a third-party role that holds funds under rules outside this protocol (MAY-T8-6). That role has no label in a Trade Manifest or in any other object this document defines; it is carried, if at all, outside those objects. Implementations of this specification MUST NOT take custody or operate escrow (MUST-T8-custody).

15.10. T9: Personally identifiable information (PII) leakage into the transparency log

A public receipt or transparency statement carries names, addresses, or full amounts that should stay private. Log-facing encodings offer redaction. See also Section 14. Narrative: [CEDULON-THREATS].

Table 24
ID Requirement
MUST-T9-1 A transparency encoding MUST support omitting or hashing payer/payee identifiers and MUST support amount redaction or range/bucket encoding.
MUST-T9-2 Implementations MUST NOT write raw government-ID, payment-instrument PAN, or street address fields into a public transparency statement.
SHOULD-T9-3 Default statements registered with a public Transparency Service SHOULD publish policyHash, manifestHash, receiptHash, and timestamp rather than full claim sets.
MAY-T9-4 A private auditor MAY receive an unredacted receipt out of band.
MUST-T9-5 A checkpoint discloses a per-currency window total, which the receipt-field rules above do not cover. Withholding it is governed by MUST-T11-12 and MUST-T11-13: null in the signed payload, and no other form of redaction honoured.

15.11. T10: Secret spend via rail bypass

An operator, leaked credential, or a second binary can settle on the rail and omit the Receipt Issuer. Completeness reconciles the extract to the receipts. See Section 12. Narrative: [CEDULON-THREATS].

The boundary allowance of MUST-T10-17 is a deliberate gap and is stated as one. Inside clockSkewMs of either edge, a settlement whose receipt was withheld, and a receipt whose settlement never happened, cost a boundary-deferred warning in a single-window audit rather than a failure: an honest payment that straddles the edge looks the same from one window, and failing it would accuse two honest parties. A settled receipt with a null rail ref is outside the gap: no row of any extract can name it, so it is the completeness finding at either edge (step 5). The gap is bounded by the allowance, it keeps the guarantee conditional, and a deployment that wants it closed audits consecutive windows: the receipt side hardens only when that adjacent extract verifies, abuts, and is empty or names the ref from inside its own window. A neighbour whose every row falls outside its own window leaves the receipt boundary-deferred. The record side hardens when the adjacent window's receipts are presented in the same bag. An audit that runs consecutive windows as one does this at every inner edge. Both bags are presented there. A record in both the inner band and the outer band stays pending, and that run can still succeed; that outcome precedes the next. An inner-edge settlement record that sits in an inner band and in no outer band resolves when the adjacent window carries a receipt for its ref through that window's facing band (step 5), and is otherwise the completeness finding. A record whose every band faces outside the run keeps the warning. A single-window audit also cannot see a ref that a receipt in the adjacent window's bag already used; the facing-band rule of step 5 keeps an adjacent extract from carrying a receipt through a settlement that window reconciles for itself, and the remaining case, a duplicate receipt for an edge settlement, is visible only to an audit that holds both bags. The nonce check of step 7 runs across the windows of that run, and a nonce whose settled receipts sit in more than one window is reported for the run on the same terms, including the shared-ref exception. The receipt ref check of step 7 runs across those windows too.

Table 25
ID Requirement
MUST-T10-1 A verifier MUST match each extract settlement to a settled receipt on ref AND amount AND currency. An audit presented with no extract, no receipts and no checkpoints reports no completeness finding. It is not thereby unconditional, and the warnings for the roots it was not given still apply.
MUST-T10-2 A settlement with no matching receipt MUST be reported as a completeness failure identified by that settlement ref.
MUST-T10-3 A settled Spend Receipt whose x402PaymentRef is not on the extract MUST be reported as a completeness failure.
MUST-T10-4 An audit that has any fail-severity completeness finding MUST fail.
SHOULD-T10-5 Hosts SHOULD still apply T5 (no ungated rail in the model process). Completeness does not replace prevention.
MUST-T10-6 A ref that appears more than once among settled receipts or among extract rows MUST be reported as duplicate-ref.
MUST-T10-7 A verifier MUST obtain the extract from the rail or from a rail signature. With no pinned rail key the extract MUST be reported as unauthenticated-extract, whatever it carries, and the completeness guarantee is conditional. With a pinned key, see MUST-T10-8: the extract MUST fail closed rather than warn.
MUST-T10-8 A verifier MUST obtain the rail public key out of band and MUST verify the extract signature against that key. The signature is checked under the key the extract carries, and that key's SubjectPublicKeyInfo MUST equal the pin: a carried key that differs is extract-key-mismatch and the rows are not reconciled, even when the signature bytes would verify under the pin. A key the extract carries MUST NOT be treated as the rail's identity and MUST NOT stand in for a key the verifier did not obtain. Without such a key the guarantee is conditional and the condition is reported as unauthenticated-extract.
MUST-T10-9 Keys MUST be compared by SubjectPublicKeyInfo DER encoding rather than by any text encoding. A pinned key that cannot be decoded MUST be reported as trust-key-unreadable, not as a key mismatch.
MUST-T10-10 Every settlement record whose timestampMs falls outside the extract's declared window MUST be reported as extract-scope-mismatch, identified by that record's ref. This check MUST run whether or not a key is pinned.
MUST-T10-11 When the verifier states an expected account, rail, or window, an extract that does not cover it MUST fail closed as extract-scope-mismatch.
MUST-T10-12 When an extract is supplied, the records it carries are the subject of reconciliation. A settlement list from another source MUST NOT be substituted; a disagreeing list MUST be reported as extract-settlement-mismatch.
MUST-T10-13 A ref reported as duplicate-ref that has records on both sides MUST still be reconciled by aggregate amount per currency, and a shortfall MUST state the unaccounted amount. Step 9 adds that comparison and does not replace MUST-T10-2 or MUST-T10-3: when the other side has no record at all, those completeness findings stand, whatever the amounts. The window sieve of MUST-T10-16 and the boundary allowance of MUST-T10-17 apply to that record as they do to a single ref. An out-of-window copy is not, by the duplicate report alone, a member of the sum. An unparseable amount MUST be reported as malformed-amount without aborting the audit.
MUST-T10-14 An implementation MUST surface the guarantee and any warnings in any human-readable audit report it produces, not only in a returned structure.
MUST-T10-15 A verifier that supplies a rail pin but has not stated the period under audit MUST emit unstated-audit-window and MUST treat the guarantee as conditional; with no rail pin at all the condition reported is unauthenticated-extract.
MUST-T10-16 When an extract is supplied, a receipt whose ref appears on it is reconciled against it regardless of its own timestampMs; the window sieve applies only to receipts the extract does not name, and such a receipt outside the window MUST NOT be reported as a completeness failure against that extract.
MUST-T10-17 An unmatched settled receipt, and an unmatched settlement record, within the declared clockSkewMs of either window edge, which is t < windowStartMs + clockSkewMs or t >= windowEndMs - clockSkewMs with no far-side cap, so a timestamp an hour past windowEndMs is inside the closing predicate when the allowance is 1 and is also extract-scope-mismatch - MUST be reported as boundary-deferred, a warning, rather than as a completeness failure. That is the general rule. Absent a declared clockSkewMs, the profile default of 300000 milliseconds applies. The exceptions follow in this order of precedence, and the first that matches is the only outcome. A settled receipt with a null rail ref is not deferred, because no row can name it, and it is the completeness finding. A signed neighbour extract that verifies, abuts, and carries no row hardens the deferred receipt to receipt-without-settlement. A neighbour whose every row falls outside its own window leaves the receipt boundary-deferred. The single-window warning stands when the adjacent extract is not presented. A receipt deferred at the closing edge resolves against the following window's extract, and one deferred at the opening edge against the previous window's extract, only through a row in the band facing this window. A deferred settlement record resolves only against a receipt in the presented bag that names its ref, and no extract hardens it. A record in both the inner band and the outer band of a two-window run stays pending, and that run can still succeed. An inner-edge settlement record that sits in an inner band and in no outer band resolves when the adjacent window carries a receipt for its ref through that window's facing band, and is otherwise the completeness finding. Consecutive windows tile by exact startMs and endMs; [0, 20) does not cover an expected [0, 19), which is extract-scope-mismatch and not a boundary outcome.
MUST-T10-18 A verifier that supplies a rail pin but has not stated the account or the rail under audit MUST emit unstated-audit-scope and MUST treat the guarantee as conditional; with no rail pin at all the condition reported is unauthenticated-extract.
MUST-T10-19 A report MUST name the account, rail and window the extract declared, in the printed report, in the finding object it returns, and in every other structure the implementation returns for that audit, a tool result or an export included. Where no extract was presented there is no declared population, and the structure names none. This requirement governs what the report names; it does not suspend step 8, which still reports every settled receipt that has no extract row.
MUST-T10-20 Where a stated rail pin refuses the presented extract and the verifier reports extract-key-mismatch, the verifier MUST NOT read a settlement finding out of that document's body: not a mismatch against a receipt, not money reported as unaccounted for, and not a receipt left unmatched by rows the refused document omits. The verifier MUST report settlement-comparison-skipped in the same result. A pinned key the verifier cannot decode is trust-key-unreadable and is not a refusal of the document, so it does not reach this requirement.
MUST-T10-21 A nonce that appears on more than one settled receipt of the issuer MUST be reported as duplicate-nonce, except where those receipts also share one ref and duplicate-ref already reports them.

In MUST-T10-4, a completeness finding that makes the audit fail is distinct from a warning that only makes the guarantee conditional. The verification algorithm states that distinction by behaviour (Section 12).

15.12. T11: Checkpoint suppression or rollback

Checkpoint suppression and rollback, and the witness that detects them, are addressed in [CEDULON-CHECKPOINT]. The two requirements below are defined here because the core label set and the reconciliation depend on them.

Table 26
ID Requirement
MUST-T11-1 An epoch checkpoint MUST be COSE-signed and MUST bind epoch number, time window, receipt count, chain-head hash, per-currency totals, and the previous checkpoint hash.
MUST-T11-12 Withheld checkpoint totals MUST be encoded as null in the signed payload. A verifier MUST report that the totals comparison was skipped and MUST treat the guarantee as conditional; receiptCount and chainHeadHash MUST still be checked.

15.13. T12: Settlement without a recorded receipt

The threats above are about a counterparty, a rail or an attacker. This one is about the issuer's own implementation, and it produces exactly the condition the rest of this document exists to make detectable. Ordering, recovery and observability: [CEDULON-THREATS].

Table 27
ID Requirement
MUST-T12-1 An issuer MUST NOT complete a settlement whose receipt it cannot record durably. The ability to record MUST be established before value moves, not after.
MUST-T12-2 Where a settlement has been made and its record cannot be completed, the issuer MUST undo the settlement in every place it still controls: in memory, on the rail ledger it controls, and in any later write it has not yet issued. A refused payment MUST NOT consume the nonce or the payment allowance it never used.
MUST-T12-3 Two issuers MUST NOT share one durable state. An implementation that permits it MUST fail loudly rather than let one writer overwrite the other's receipt, and the failure MUST name what an operator can act on.
MUST-T12-4 Where a settlement has entered a rail the issuer does not control, and the local record cannot be completed, the outcome is indeterminate. The issuer MUST NOT treat the payment as reversed, and MUST NOT return the authority to spend, unless it holds authenticated evidence that the rail did not complete the settlement or that a reversing entry completed.

16. IANA Considerations

This document requests the registration of four media types in the "Media Types" registry [RFC6838], in the standards tree, each carrying the +cbor structured syntax suffix that [RFC8949] registers. Each names one of the COSE_Sign1 objects this document defines and is carried as the COSE content type header parameter (label 3) of that object (Section 7). The value is a normative check inside a protected header (MUST-T4-8, MUST-T6-5), which is why the names cannot stay unregistered while that check stands. Registration in the standards tree requires IETF approval; until then, an implementation outside a closed deployment should treat these names as placeholders that a registration may change. The provisional registration procedure of [RFC6838] Section 5.2.1 is available to an Internet-Draft, and a provisional entry, if one is made, is superseded by the registration this section requests.

The claim labels this document assigns inside the CBOR claim sets, -70001 through -70402 (Section 7.1, Section 6.1), lie in the Private Use range of the "CBOR Web Token (CWT) Claims" registry [RFC8392], integer values less than -65536, and this document requests no assignment for them. A later Standards Track revision that moves them into the assigned range will request new labels then, without reinterpreting these.

No other IANA action is requested.

The four templates follow. The checkpoint and inclusion types are in [CEDULON-CHECKPOINT]. Fields that are the same for every one are stated once, in the first, and the others say so.

16.1. application/cedulon-receipt+cbor

Type name:

application

Subtype name:

cedulon-receipt+cbor

Required parameters:

N/A

Optional parameters:

N/A

Encoding considerations:

binary. A COSE_Sign1 structure [RFC9052] in deterministic CBOR [RFC8949], untagged, as profiled in Section 6 and Section 7.

Security considerations:

See Section 15 of this document. The object is signed; its evidentiary weight depends on the verifier holding the issuer key out of band (Section 11.1), never on a key the object carries.

Interoperability considerations:

The claim set is a CBOR map with the labels and types stated in Section 7.1, encoded per [RFC8949] Section 4.2.1. A decoder refuses a duplicate key (MUST-T4-18), an input beyond its stated bounds (MUST-T4-19), and a non-empty unprotected header (MUST-T4-21) by name rather than accepting it.

Published specification:

This document, Section 6.

Applications that use this media type:

Agent payment adapters, policy decision points, auditors, and dispute-evidence tooling that produce or verify Cedulon Spend Receipts.

Fragment identifier considerations:

N/A

Additional information:

Deprecated alias names for this type: N/A. Magic number(s): N/A. File extension(s): N/A. Macintosh file type code(s): N/A.

Person and email address to contact for further information:

Emek Can Dogru, e.dogru@cedulon.com

Intended usage:

COMMON

Restrictions on usage:

N/A

Author:

Emek Can Dogru

Change controller:

IETF

16.2. application/cedulon-manifest+cbor

Type name:

application

Subtype name:

cedulon-manifest+cbor

Encoding considerations:

binary. A COSE_Sign1 structure in deterministic CBOR, untagged, as profiled in Section 5 and Section 7.

Security considerations:

See Section 15 of this document. A manifest is an offer signed before payment; it binds terms, not delivery, and is verified only against a publisher key held out of band (Section 11.4).

Interoperability considerations:

As for application/cedulon-receipt+cbor; the labels are those of the manifest table in Section 7.1, and the payee label is encoded only when present.

Published specification:

This document, Section 5.

Applications that use this media type:

Payees and marketplaces that publish signed offers to paying agents, and verifiers reconciling receipts against those offers.

Required parameters, optional parameters, fragment identifier considerations, additional information, contact, intended usage, restrictions on usage, author, change controller:

As for application/cedulon-receipt+cbor.

16.3. application/cedulon-decision+cbor

Type name:

application

Subtype name:

cedulon-decision+cbor

Encoding considerations:

binary. A COSE_Sign1 structure in deterministic CBOR, untagged, as profiled in Section 9 and Section 7.

Security considerations:

See Section 15 of this document. A Decision Token is consumed at the gate by the party that issued it (Section 11.3); it is not an input to the retrospective audit (Section 12.1), and a verifier that treated it as one would be claiming a check the audit does not make.

Interoperability considerations:

As for application/cedulon-receipt+cbor; the labels are those of the Decision Token table in Section 7.1, all five always present.

Published specification:

This document, Section 9.

Applications that use this media type:

Policy decision points and the payment adapters that consume their allow decisions.

Required parameters, optional parameters, fragment identifier considerations, additional information, contact, intended usage, restrictions on usage, author, change controller:

As for application/cedulon-receipt+cbor.

16.4. application/cedulon-countersign+cbor

Type name:

application

Subtype name:

cedulon-countersign+cbor

Encoding considerations:

binary. A separate COSE_Sign1 structure in deterministic CBOR, untagged, as profiled in Section 6.1, whose payload carries the exact issuer receipt octets it countersigns.

Security considerations:

See Section 15 of this document. A countersignature that does not verify under a payee key held out of band carries no evidentiary weight and cannot move the verdict on the receipt it travels beside (Section 6.1, Section 11.2).

Interoperability considerations:

As for application/cedulon-receipt+cbor; the optional deliveredHash claim is a 32-octet byte string and is read as absent when it is not.

Published specification:

This document, Section 6.1.

Applications that use this media type:

Payees that acknowledge a receipt and, optionally, bind the bytes they delivered.

Required parameters, optional parameters, fragment identifier considerations, additional information, contact, intended usage, restrictions on usage, author, change controller:

As for application/cedulon-receipt+cbor.

17. Reference behaviour of this revision

The algorithm states the findings. This section states the cases an implementer otherwise has to discover by running the code.

A hash claim that is text, and whose only defect is the spelling, fails the audit and stays in the match set. A missing hash or a number, under a usable issuer pin, is still malformed-policy-hash and the receipt's covering count is 0. On a checkpoint the same grammar's effect under each pin state is the generated table in [CEDULON-CHECKPOINT]. The direct verifiers do not all re-check every hash grammar.

A missing extract body, a settlements value that is not an array, or a null settlement row can surface as presented-object-malformed, because the body is read before the shape helper. Other shape refusals are reported as extract-key-mismatch when a pin can be read. With no pin, a named body refusal such as a missing accountId can leave the audit successful, the guarantee conditional, and settlement-comparison-skipped set. missing-extract-body is the name the signer and the shape helper use. It does not always reach the audit under that name.

A refused extract body still emits extract-scope-mismatch, and a caller-supplied list can still emit extract-settlement-mismatch. MUST-T10-20 forbids settlement-match findings from that body. It does not forbid those two.

An inner-edge settlement row is closed by a receipt in the facing band of the neighbouring window when the amount and the currency are equal. The beneficiary is not checked on that carried match. A band that looks at the outer edge can stay deferred. A receipt the issuer pin rejected is not immediately settlement-without-receipt; the edge rule still applies.

duplicate-ref is reported before the time sieve. Step 8's receipt-without-settlement and settlement-without-receipt apply to a repeated ref whose other side has no record, whatever the amounts, and step 9 does not replace them. Step 9's aggregate runs when the ref has records on both sides, and only on the in-scope group. The duplicate report alone does not put an out-of-window receipt into that sum. A repeated ref inside the edge band stays boundary-deferred.

When the issuer pin cannot be read, manifest departure and a repeated receipt ref are still reported on the diagnostic path. The chain walk returns the first break. More than ten foreign receipts collapse under one issuer-key-mismatch, and the individual refusal names are not repeated. Under a fully unreadable issuer pin the chain walks an empty coverage list, so some decoder refusals are never named. A Trade Manifest coseHex the decoder refuses by name is still named: under a publisher pin that cannot be read the name is in the trust-key-unreadable detail.

A pinless anchor is ignored on this revision. The chain break is reported only when the chain depends on that ignored anchor, and a genesis chain does not break. Its presented hash claims are still held to the grammar. Version 0.18.0 used a valid-looking pinless anchor. This revision does not derive checkpoint-withheld or equivocation from a witness body without a usable issuer pin. Version 0.18.0 did. An empty inclusion list warns witness-inclusion-not-exercised only when no tier-2 input was supplied. Beside layer2: {} the warning is absent and the only code is witness-inclusion-invalid. Absence of the list warns nothing. Version 0.18.0 did not. An empty list does not prove that a witness was queried or that the log is empty. The witness wire, the legacy three-entry payload, and the separation from the RFC 9942 receipt wire are in [CEDULON-CHECKPOINT].

An empty epoch's chainHeadHash is null and does not carry the previous receipt head.

unguardedSettle, the path that takes no policy engine, can settle a payment without a Decision Token. audit() does not settle, and a token on the input does not change the report. Called with no engine, gatedSettle returns engine-unavailable and mints no receipt, and only after the earlier refusals pass. A missing payment header is payment-required. A short nonce is nonce-too-short. A request that carries manifestHash and no manifest is manifest-hash-without-manifest. A pinless manifest is manifest-unauthenticated. A hash claim outside the 64-lowercase-hex grammar is the named malformed-*-hash refusal. unguardedSettle returns 200 for an expired manifest that verifies only against the key it carries. audit() takes no token and does not settle. The payment profile is gatedSettle called with a policy engine. With issuer keys, that path mints a Decision Token and consumes it on the first settlement attempt of the matching request (MUST-T6-2): success, or a fail-closed abort, both consume it, and a second attempt is decision-replay. With a policy engine and no issuer keys the same path consumes the decision id and can still return 200 without minting a token. Consumption is that first attempt. It is not a successful settlement, and it is not the reservation release of MUST-T12-2. A decision that was not consumed is not, by that fact, a released reservation. decision-mismatch does not consume the decision.

extra-settlements-with-extract is a refusal of the MCP cedulon_audit call when extraSettlements is non-empty. It is not an audit finding. An empty caller list beside an extract that carries rows is extract-settlement-mismatch. An empty extraSettlements list is accepted. audit() with a different list reports extract-settlement-mismatch and continues on the extract.

The optional escrow actor is not a profile field of a Spend Receipt, an epoch checkpoint, a Trade Manifest, a Decision Token, or a witness receipt. An x402 STARK proof is not a profile field of those objects either. Not defining a profile field does not forbid a carrier-specific member inside a signed Rail Extract: a rail MAY add members, and a private escrowActor on the signed extract body, or starkProof on a row verified under the rail pin, is that kind of member.

The durable obligations of T12 apply when persistence is enabled. The default session and the mock ledger do not persist.

The reversal branch of MUST-T12-4 is specified and not executed. This tree has no authenticated external-rail path that would run it. The extract-indeterminate path is implemented.

Checkpoint and witness finding codes live in [CEDULON-CHECKPOINT]. The codes of Appendix B are the core algorithm's.

18. Changes since -06

19. Changes since -05

20. Implementation Status

This section is to be removed before publishing as an RFC.

RFC 7942 [RFC7942] note. Detailed status is kept in the companion repository, where it can be corrected without a revision of this document.

Implementation:

A companion implementation with a runnable verification suite at https://github.com/dogrucanemek-alt/cedulon. The code is a profile of this document, not a second specification. This -07 is not an IETF working-group item.

Maturity:

Research code by a single implementer. Three readers have run the code on their own machines against a pinned commit and reported figures matching the author's: two from a clean clone of the whole suite, one re-running the published reproduction. That is byte-stability across environments and not an independent implementation; the same code agreeing with itself on three machines rules out a local accident and nothing more. One reader reports an independent implementation of the Signed Statement identity, kept deliberately separate from this codebase; an independent implementation pass of the tranche-1 audit is known and named in the next paragraph, and no independent implementation of the reconciliation algorithm beyond that pass is known to the author. One reader rebuilt the regenerated receipt vector of Appendix A from this text alone, in an independent toolchain, and obtained the published 307 octets byte for byte, SHA-256 0f1fe8859faf25de906b08142674f1270656d8ea7bfc00853c2fc6e9d3f5a10b; that reader had read parts of the public repository and says so, so it is not a clean-room result.

Tiago Pinto ran a pre-registered, timestamped implementation pass of the tranche-1 audit (core-05 Section 12.1 steps 1 to 11 and checkpoint-01 Section 2.5 steps 1 to 3). The implementation was built from the posted text and frozen before it was compared with this codebase. Its author had seen parts of the public repository before, so it is not a clean-room result.

Coverage:

The receipt, checkpoint, extract, reconciliation and verification algorithm are implemented, including the transparency witness input, the withheld and not-anchored conditions, and signed totals redaction. Every requirement added in the posted series [CEDULON-DT] is covered by a red-then-green case written before the text. The -06 tree's re-submission path released a payment in doubt when the rail answered "failed", contrary to MUST-T12-4. This revision's tree keeps that payment indeterminate until verified extract evidence resolves it, or a later idempotent retry answers "settled" and records the receipt. The reversal branch is still specified and not executed. MUST-T6-7 and MUST-T10-21 are the requirements this document adds beyond that series. MUST-T6-7 is covered on the x402 adapter settle path: consumption and the receipt stamp use the same clock value; the suite asserts the boundary and one millisecond past it, and the refusal name is decision-expired. MUST-T10-21 is covered by tests/audit-duplicate-nonce.test.ts, red on the -06 tree and green on this one. The escrow role, reversal, refund and partial settlement are not implemented. The witness used in the suite is the in-process log that MAY-T11-6 permits, a Merkle tree that issues inclusion proofs; tier 2 of [CEDULON-CHECKPOINT] (The transparency witness) is exercised against it red-then-green, and the implementation has not been run against a deployed Transparency Service.

The repository's conformance vectors include cases for the edge allowance, the facing band and the anchor of this revision, each quoting the sentence of this document it tests, and a test holds the quotations to the text. A vector carries no code of the companion implementation; running one still needs a runner that builds the case it describes. checkPresentedForm reports the outer members it walks: receipts, checkpoints, anchorCheckpoint, manifest, extract, previousExtract, and nextExtract, and on each the signature, the PEM, the encoding, and coseHex or counterCoseHex. It does not walk a rail-body row and it does not walk inclusionReceipts. An extract row {amount: 1, timestampMs: "50"} with no currency, and inclusionReceipts: [{}], are both an empty report from that function.

Continuous integration of the pre-release suite - the post-release registry checks are a separate job, deliberately excluded, so "the suite" names exactly what was measured - is not claimed here: no hosted-runner count is stated for the commit this revision describes. The Linux and macOS workflows refuse to run as root. The Windows workflow does not make that check, so this sentence does not claim the Windows runner was a non-root user. The count of 1086 cases is the figure -05 described and entered with commit 068861e; this revision does not cite a hosted job log for that figure. A local Windows run without symbolic-link privilege measures 1410 cases, 4 skipped with a stated reason rather than passing silently. A count of three hosted runners, none skipped, is written here only when that commit's Linux, macOS and Windows records exist. [CEDULON-CHECKPOINT] is a normative reference to draft-dogru-cedulon-checkpoint-02, which is in the IETF archive.

Licensing:

Apache-2.0.

Contact:

The author of this document.

Experience:

The posted series [CEDULON-DT] was driven by what readers found rather than by a plan. T12 came from none of them: it was found while writing an adversarial task, in the ordering the implementation itself used.

The manifest root (MUST-T4-15) and the gate's refusal to settle against a manifest it cannot attribute (MUST-T4-16) were published as 0.4.0 rather than as a patch: the gate had been answering 200 to an unattributable manifest and writing that manifest's hash into the receipt, and refusing it is a change in behaviour that a version number ought to announce.

Note on distribution: the posted series [CEDULON-DT] is not all in the packages at version 0.9.0. That series itself places the extended MUST-T10-19 and the window rule in 0.10.0 and excepts reversal, and the nine workspace packages are prepared at 0.20.0 as this revision is written and are not a published npm release; npm serves those nine at 0.19.0. Private packages (the base extract, the MCP guard, and the demo) sit beside those nine and are not part of that published count. A reader can check a claim against an installed package rather than against a working tree, with one limit: every change the 0.20.0 section of the companion repository's docs/UPGRADING.md lists as new is in this working tree and in no published version yet. That section is the list. This sentence does not repeat it.

A second implementation is named here. Same author as this document; not an independent implementation.

Organization:

VERAX TEKNOLOJI LIMITED SIRKETI.

Implementation:

Verax. An MCP body that consumes the published @cedulon/* libraries to write signed decision records, effect extracts and checkpoints. The code is a profile of this document, not a second specification.

Description:

The body admits six tools of its own through its gate: memory.get, memory.put, message.read, message.send, spend and audit.explain. Tools of the child MCP servers its operator names are published as prefix.childName, and a call forwarded to one passes the same gate and leaves the same signed decision record and effect row. An admitted call leaves a signed decision record; a retry under the same reference is answered from that record rather than writing a second one, and a denial the body cannot append is refused to the caller instead of being recorded. An allowed call is expected to leave an effect row, and the audit path reconciles the rows against the records; an allow whose effect cannot be found is reported as such rather than assumed to have run. A halted body answers every further call with a signed denial record. Since 0.7.0 a failed check of the body's memory store halts it the same way, and a call that meets the halt after its allow is refused before it runs and leaves a signed halted effect row. Since 0.8.0 a policy can name data classes on a call's arguments and on its result; a gated result leaves its own signed decision record, carrying counts and a hash of what the agent received, and the offline verifier holds it to the call's effect row. Each halt and resume is also written to the ledger as a control record signed by the body's record key, naming whoever the halt history names. When an operator is registered, an approval over HTTP carries a passkey (WebAuthn) assertion bound to the held request, and the offline verifier checks it again against the operator's public key; a command-line approval stays unsigned. Since 0.6.0 such an approval can also arrive from another device through an operator door that is off unless the operator configures it. Taking a passkey out of use is written to the ledger as a signed record, and the offline verifier does not count an approval signed with it that the ledger holds after that record. Once an operator is registered, a resume over HTTP is refused without such an assertion; a halt may carry one and is never refused for lacking it; a halt or resume from the command line stays unsigned. Each token revocation is also written as a signed denial record. The offline verifier holds each record to the inputs row its signed inputs hash names, and each checkpoint's counts to the records it covers.

Level of maturity:

Research and pilot. Witnesses are self or same-org. There is no third-party witness of the body's own effects and no outside audit. A checkpoint hash can be registered with a Transparency Service that someone else runs, and the receipt is checked offline; that receipt shows the checkpoint existed, not what the tools did. One live spend row has been reconciled against a card statement: 10.00 TRY on 6 September 2026, a charge made by hand after the rail deferred it and an operator approved it. That statement carried dates without times and the rule named no descriptor, so the row was matched on the wide date window by amount, currency and class; a settled rather than a pending row is unproven, as is a statement holding several rows of one amount. A tenant boundary has not been exercised with two live customers.

Coverage:

@cedulon/cose and @cedulon/core implement the signed decision record (COSE Sign1 and the Decision Record). @cedulon/effect-extract implements the effect extract. @cedulon/checkpoint implements the checkpoint. These four are dependencies of @verax-ai/body and of @verax-ai/proxy. @cedulon/audit, a dependency of @verax-ai/proxy, is called when a window is explained. @cedulon/x402-adapter, also a dependency of @verax-ai/proxy, is used for its types; there is no live x402 rail, and the body does not move money.

Version compatibility:

Verax 0.11.0 depends on @cedulon/* 0.16.0. Those packages are not claimed to implement a posted revision: 0.14.0, 0.15.0 and 0.16.0 each changed verifier behaviour after draft-dogru-cedulon-09 was posted, as the upgrade notes of the Cedulon repository record, and no posted revision describes the result. This document is the split form of that numbered series, and states behaviour that is newer than the packages Verax depends on.

Licensing:

Apache-2.0.

Implementation experience:

Used by its author to record tool calls and to reconcile one live card charge. Gaps that remain - a third-party witness, two live customers on one body, a live payment rail - are named in STATUS.md in the Verax repository, not claimed here.

Contact:

The author of this document.

URL:

https://github.com/verax-ai/verax. The packages @verax-ai/body, @verax-ai/proxy and @verax-ai/inventory are on npm at 0.11.0 (https://www.npmjs.com/package/@verax-ai/body, https://www.npmjs.com/package/@verax-ai/proxy, https://www.npmjs.com/package/@verax-ai/inventory). The MCP Registry name is io.github.verax-ai/verax. The archived release is https://doi.org/10.5281/zenodo.22811593.

21. Evolution and Future Work (Informative)

This document is an individual Internet-Draft. If the work is taken up, the intended track is a Standards Track profile of COSE [RFC9052] and CWT [RFC8392] for agent-spend receipts. Two extensions are sketched and not specified here: re-attestation of receipts when a signature algorithm is retired [REATTEST], and reconciliation evaluated as settlements arrive rather than per epoch [STREAMING]. The same completeness check could apply to other consumed resources, such as compute or data; this document does not specify those profiles.

22. Informative Notes on Adjacent Protocols

x402 [X402] uses HTTP 402 [RFC9110] to negotiate stablecoin payment. AP2 [AP2] uses signed mandates as verifiable credentials. Cedulon does not replace either protocol. Profiles built on HTTP Message Signatures [RFC9421] authenticate bots; they are not a spend receipt. The drafts below are complementary, and none of them defines rail-extract completeness. draft-bates-atp [BATES-ATP] covers tamper-evident causal lineage as a signed directed acyclic graph. draft-vauban-x402-stark-receipts [VAUBAN] specifies x402 receipt-format variants. A Cedulon Spend Receipt does not carry one: the proof, if a deployment keeps it, sits outside the objects this document defines. draft-schrock-ep-outcome-binding [SCHROCK] compares authorized action bytes to independently observed effects. draft-marques-asqav-compliance-receipts [MARQUES] profiles access-control action receipts (the broader Acta family includes [ACTA]). draft-hopley-x402-compliance-receipt [HOPLEY] records an admission-time compliance decision. draft-abak-agent-control-delivery-evidence [ABAK] states evidence requirements for a governance control - stop, suspend, revoke - travelling toward the component expected to constrain a runtime, and keeps emission, receiver-side observation, enforcement outcome and observed control effect as separate results. Its object moves the other way from this one: Cedulon reconciles a spend that already happened against what the rail reported, and evidences neither the delivery of a control instruction nor its enforcement. A denied spend leaves no portable artifact here at all - a Decision Token encodes an allow (Section 9) - so what a Cedulon audit says about a refusal it says through the settlement that did not appear on the extract, which is an effect observation over a declared population and not an acknowledgement from an enforcement point. Its bounded-population rule and this document's MUST-T10-18 and MUST-T10-19 are the same kind of bound on two different objects.

draft-kuehlewind-audit-architecture [KUEHLEWIND-AUDIT], the architecture a Cedulon audit is intended to be read within, is described in Section 1; it also covers propagation of audit context across domains and optional attestation under the Remote ATtestation procedureS (RATS) architecture. draft-birkholz-verifiable-agent-conversations [BIRKHOLZ-VAC] defines a COSE-signed record of an agent's conversation - session metadata, messages, tool invocations, reasoning traces - for the same Transparency Services. A Spend Receipt is the kind of artifact such a record would name for a payment step; neither document profiles the other, and the conversation record does not define rail-extract completeness.

23. References

23.1. Normative References

[CEDULON-CHECKPOINT]
Dogru, E. C., "Cedulon Checkpoints: Epoch Witnesses and Transparency", Work in Progress, Internet-Draft, draft-dogru-cedulon-checkpoint-02, , <https://datatracker.ietf.org/doc/draft-dogru-cedulon-checkpoint/02/>.
[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC4648]
Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10.17487/RFC4648, , <https://www.rfc-editor.org/rfc/rfc4648>.
[RFC6234]
Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)", RFC 6234, DOI 10.17487/RFC6234, , <https://www.rfc-editor.org/rfc/rfc6234>.
[RFC6838]
Freed, N., Klensin, J., and T. Hansen, "Media Type Specifications and Registration Procedures", BCP 13, RFC 6838, DOI 10.17487/RFC6838, , <https://www.rfc-editor.org/rfc/rfc6838>.
[RFC7493]
Bray, T., Ed., "The I-JSON Message Format", RFC 7493, DOI 10.17487/RFC7493, , <https://www.rfc-editor.org/rfc/rfc7493>.
[RFC8032]
Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital Signature Algorithm (EdDSA)", RFC 8032, DOI 10.17487/RFC8032, , <https://www.rfc-editor.org/rfc/rfc8032>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/rfc/rfc8174>.
[RFC8392]
Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, , <https://www.rfc-editor.org/rfc/rfc8392>.
[RFC8410]
Josefsson, S. and J. Schaad, "Algorithm Identifiers for Ed25519, Ed448, X25519, and X448 for Use in the Internet X.509 Public Key Infrastructure", RFC 8410, DOI 10.17487/RFC8410, , <https://www.rfc-editor.org/rfc/rfc8410>.
[RFC8785]
Rundgren, A., Jordan, B., and S. Erdtman, "JSON Canonicalization Scheme (JCS)", RFC 8785, DOI 10.17487/RFC8785, , <https://www.rfc-editor.org/rfc/rfc8785>.
[RFC8949]
Bormann, C. and P. Hoffman, "Concise Binary Object Representation (CBOR)", STD 94, RFC 8949, DOI 10.17487/RFC8949, , <https://www.rfc-editor.org/rfc/rfc8949>.
[RFC9052]
Schaad, J., "CBOR Object Signing and Encryption (COSE): Structures and Process", STD 96, RFC 9052, DOI 10.17487/RFC9052, , <https://www.rfc-editor.org/rfc/rfc9052>.
[RFC9053]
Schaad, J., "CBOR Object Signing and Encryption (COSE): Initial Algorithms", RFC 9053, DOI 10.17487/RFC9053, , <https://www.rfc-editor.org/rfc/rfc9053>.
[RFC9864]
Jones, M.B. and O. Steele, "Fully-Specified Algorithms for JSON Object Signing and Encryption (JOSE) and CBOR Object Signing and Encryption (COSE)", RFC 9864, DOI 10.17487/RFC9864, , <https://www.rfc-editor.org/rfc/rfc9864>.
[RFC9942]
Steele, O., Birkholz, H., Delignat-Lavaud, A., and C. Fournet, "CBOR Object Signing and Encryption (COSE) Receipts", RFC 9942, DOI 10.17487/RFC9942, , <https://www.rfc-editor.org/rfc/rfc9942>.
[RFC9943]
Birkholz, H., Delignat-Lavaud, A., Fournet, C., Deshpande, Y., and S. Lasker, "An Architecture for Trustworthy and Transparent Digital Supply Chains", RFC 9943, DOI 10.17487/RFC9943, , <https://www.rfc-editor.org/rfc/rfc9943>.

23.2. Informative References

[ABAK]
Abak, A. T., "Evidence Requirements for Agent Control Delivery and Outcome Reconciliation", , <https://datatracker.ietf.org/doc/draft-abak-agent-control-delivery-evidence/>.
[ACTA]
Farley, T., "Signed Decision Receipts for Machine-to-Machine Access Control", , <https://datatracker.ietf.org/doc/draft-farley-acta-signed-receipts/>.
[AP2]
Google Agentic Commerce, "Agent Payments Protocol (AP2)", , <https://ap2-protocol.org/ap2/specification/>.
[BATES-ATP]
Bates, D., "Agent Transaction Protocol (ATP)", , <https://datatracker.ietf.org/doc/html/draft-bates-atp>.
[BIRKHOLZ-VAC]
Birkholz, H., Heldt, T., and O. Steele, "Verifiable Agent Conversation Records", , <https://datatracker.ietf.org/doc/draft-birkholz-verifiable-agent-conversations/>.
[CEDULON-DT]
Dogru, E. C., "Cedulon: An Audit Layer for Agent-to-Agent Commerce", , <https://datatracker.ietf.org/doc/draft-dogru-cedulon/>.
[CEDULON-PQ]
Dogru, E. C., "Hybrid Ed25519 and ML-DSA-87 Signatures for Cedulon Receipts and Checkpoints", Work in Progress, Internet-Draft, draft-dogru-cedulon-pq-hybrid-00, , <https://datatracker.ietf.org/doc/draft-dogru-cedulon-pq-hybrid/00/>.
[CEDULON-THREATS]
Dogru, E. C., "Cedulon Threat Narratives", Work in Progress, Internet-Draft, draft-dogru-cedulon-threats-00, , <https://datatracker.ietf.org/doc/draft-dogru-cedulon-threats/00/>.
[CPB]
Mih, S. and A. Sokolov, "Canonical Payload Binding: A Signed Statement Construction Profile", , <https://datatracker.ietf.org/doc/draft-mih-sokolov-scitt-payload-binding/>.
[GRIGG]
Grigg, I., "Triple Entry Accounting", , <https://iang.org/papers/triple_entry.html>.
[HOPLEY]
Hopley, C., "Categorical Compliance Screening Receipt Format for Agentic-Payment Flows", , <https://datatracker.ietf.org/doc/draft-hopley-x402-compliance-receipt/>.
[KUEHLEWIND-AUDIT]
Kuehlewind, M. and H. Birkholz, "An Architecture for Auditing AI Agent Delegation and Interactions", , <https://datatracker.ietf.org/doc/draft-kuehlewind-audit-architecture/>.
[MARQUES]
Gomes Marques, J. A., "Compliance Profile of Signed Action Receipts for AI Agents", , <https://datatracker.ietf.org/doc/draft-marques-asqav-compliance-receipts/>.
[PACIOLI]
Pacioli, L., "Summa de arithmetica, geometria, proportioni et proportionalita", .
[REATTEST]
Dogru, E. C., "Cedulon Re-Attestation: Carrying Spend Evidence Across Algorithm Retirement", , <https://github.com/dogrucanemek-alt/cedulon/blob/e681e24d1b29912d8c190259c2ea9f4f9538c29d/spec/draft-dogru-cedulon-reattestation-00.md>.
[RFC7942]
Sheffer, Y. and A. Farrel, "Improving Awareness of Running Code: The Implementation Status Section", BCP 205, RFC 7942, DOI 10.17487/RFC7942, , <https://www.rfc-editor.org/rfc/rfc7942>.
[RFC9110]
Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Semantics", STD 97, RFC 9110, DOI 10.17487/RFC9110, , <https://www.rfc-editor.org/rfc/rfc9110>.
[RFC9338]
Schaad, J., "CBOR Object Signing and Encryption (COSE): Countersignatures", STD 96, RFC 9338, DOI 10.17487/RFC9338, , <https://www.rfc-editor.org/rfc/rfc9338>.
[RFC9421]
Backman, A., Ed., Richer, J., Ed., and M. Sporny, "HTTP Message Signatures", RFC 9421, DOI 10.17487/RFC9421, , <https://www.rfc-editor.org/rfc/rfc9421>.
[SCHROCK]
Schrock, I., "Outcome Binding for Authorized Actions and Independently Observed Effects", , <https://datatracker.ietf.org/doc/draft-schrock-ep-outcome-binding/>.
[STREAMING]
Dogru, E. C., "Cedulon Streaming Reconciliation: Continuous Completeness for Agent Spend", , <https://github.com/dogrucanemek-alt/cedulon/blob/e681e24d1b29912d8c190259c2ea9f4f9538c29d/spec/draft-dogru-cedulon-streaming-00.md>.
[VAUBAN]
Vauban Research, "x402 STARK Receipt Format Extension", , <https://datatracker.ietf.org/doc/draft-vauban-x402-stark-receipts/>.
[X402]
x402 Foundation, "x402: An Open Standard for Internet-Native Payments", , <https://www.x402.org/>.

Appendix A. Test Vectors

These vectors use the RFC 8032 Section 7.1 TEST 1 secret key seed (fixture only; never a production key). Hex is lowercase.

The vectors below MUST stand as the locked tests of this document: an implementation matches them or it does not, and where an implementation and a vector disagree, one of the two is wrong and this document does not say in advance which.

Receipt COSE_Sign1:

Claims: payer=payer-1, payee=payee-1, amount=1, currency=USD, policyHash= fca4142da8ad241d24928227893894f4b5365efb746a4529fe9df0119d10da2c (the SHA-256 of the UTF-8 octets of the ASCII string cedulon/appendix-policy, standing in for a canonical policy document. That digest is SHA-256 of those raw ASCII octets. It is not the JCS encoding of a JSON string. The field's input rule is in Section 8.1), manifestHash=null, noManifest=true, x402PaymentRef=null, timestampMs=1700000000000, nonce=n100000000000000, prevReceiptHash=null, outcome=aborted.

COSE_Sign1 hex (whitespace ignored):

845830a301320378206170706c69636174696f6e2f636564756c6f6e2d
726563656970742b63626f72044806e3fd8fda29bb60a058bbac3a0001
11706770617965722d313a000111716770617965652d313a0001117261
313a00011173635553443a000111747840666361343134326461386164
323431643234393238323237383933383934663462353336356566623734
366134353239666539646630313139643130646132633a00011175f63a
00011176f53a00011177f63a000111781b0000018bcfe568003a000111
79706e3130303030303030303030303030303a0001117af63a0001117b
6761626f7274656458400a24269b7521d409ebe462db297c3aa25b23d6
c697aa4a864b1b3a3edb5b30537b34b048a797073eaee41af371effb68
ecbb47b80e62d7e775e8cae5b066c30c

Manifest COSE_Sign1:

Claims: description=fixture-goods, amount=1, currency=USD, acceptanceCriteriaHash= e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (the SHA-256 of an empty delivery; the field is a digest of the exact delivery bytes, so the vector carries a well-formed one), cancelCondition=none, expiresAtMs=1700000000000, ap2MandateHash=null.

COSE_Sign1 hex (whitespace ignored):

845831a301320378216170706c69636174696f6e2f636564756c6f6e2d
6d616e69666573742b63626f72044806e3fd8fda29bb60a05889a73a00
0112386d666978747572652d676f6f64733a0001123961313a0001123a
635553443a0001123b7840653362306334343239386663316331343961
666266346338393936666239323432376165343165343634396239333
463613439353939316237383532623835353a0001123c646e6f6e653a
0001123d1b0000018bcfe568003a0001123ef65840599b5b1cc7bfd3fe
8b8e65cdd876652aeca13660e6bdccc93afe12188a295b20fdfe8e6e48
ae447dc74ccb0f13383f0f43f0f67f288d61a6395e95e2038e320d

Appendix B. Finding Codes

Table 28
Code Effect Meaning
settlement-without-receipt audit fails Extract row has no matching settled receipt, including each row of a repeated ref whose other side has no record, or a repeating ref with records on both sides that settled more than it receipted
receipt-without-settlement audit fails Settled receipt ref is not on the extract, including each settled receipt of a repeated ref whose other side has no record
settlement-mismatch audit fails Same ref, different amount or currency, including a repeating ref that settled less than it receipted
duplicate-ref audit fails under a usable issuer pin; warning without one Ref appears more than once on one side. Without a usable issuer key the repeated receipt ref cannot be attributed to a party and is a warning; a repeated extract row is the rail's and keeps the failing severity. Step 9 adds the amount comparison when the ref has records on both sides and does not replace MUST-T10-2 or MUST-T10-3 when the other side has no record. The two severities are the two branches of MUST-T8-9
duplicate-nonce audit fails under a usable issuer pin; warning without one A nonce that appears on more than one settled receipt of the issuer (MUST-T10-21). When those receipts also share one ref, duplicate-ref reports them and this code is not reported in addition. The two severities are the two branches of MUST-T8-9
settled-without-ref audit fails outcome is settled and x402PaymentRef is null
receipt-chain-break audit fails Signature or prevReceiptHash failed, or the links cannot place a receipt (issuer order, step 6)
unauthenticated-extract guarantee conditional No verifier-supplied rail key, whatever the extract carries: a signature that verifies establishes internal consistency and not that the named rail produced the extract, and one that fails or is refused is not a key verdict either. The same code is reported when a rail key is pinned and no extract was presented at all, because there is nothing to check the pin against. A presented extract that does not verify under a pinned key is extract-key-mismatch instead
extract-key-mismatch audit fails A readable pinned rail key, and the carried Ed25519 key's SubjectPublicKeyInfo differs from it, or the signature does not verify under the carried key. A difference stands even when the signature bytes would verify under the pin, and the rows are not reconciled. A missing outer object, 0, or "" is absence, not this code. An outer [] is presented-object-malformed
settlement-comparison-skipped guarantee conditional The pinned rail key refused the presented extract, or, with or without a pin, a refusal of the table below refused its body, so its rows were not reconciled against the receipts (MUST-T10-20). The code says what did not run; a key refusal itself is reported as extract-key-mismatch, and a refusal of the body is named in this code's detail
trust-key-unreadable audit fails A pinned key - rail, issuer, or manifest publisher - could not be decoded; the verifier's configuration is at fault, and nothing falls back to the keys the objects carry. An unreadable witness pin is unauthenticated-witness in [CEDULON-CHECKPOINT], not this code
issuer-key-mismatch audit fails An object is signed by a key other than the pinned issuer key, or does not verify under it at all, so it is not coverage for anything it names. A checkpoint reaches this code by either route: unlike a receipt, which is named in the chain walk as receipt-chain-break when it claims the pin and fails, a checkpoint that claims the pin and fails is reported here and leaves its window uncovered. This finding also prevents an unconditional guarantee
countersign-key-mismatch conditional A countersignature verifies under a key other than the one pinned for that payee; unattributable, discarded as approval evidence, and the receipt it rode beside is unaffected (Section 6.1). An unreadable payee pin is not trust-key-unreadable. The carried key is what is tried: a signature that verifies under it is countersign-key-mismatch, one that does not is countersign-bad, and countersign-missing stays open either way (Section 7.3.1)
countersign-missing conditional A payee key is pinned and a settled receipt for that payee carries no attributable countersignature; a discarded garbage or foreign-key object leaves this open
unauthenticated-issuer conditional No verifier-supplied issuer key and at least one receipt or checkpoint presented; their signatures are checked against the keys the objects carry (Section 7.3), which establishes that each object is internally consistent and not that the named issuer produced it. Identified by anchor, it is also reported for an anchor checkpoint presented with no issuer key pinned: there is no issuer root for it to answer to, so it anchors nothing (MUST-T11-20)
unauthenticated-countersigner conditional No verifier-supplied payee key; a countersignature is present but proves no approval
unauthenticated-manifest conditional No verifier-supplied manifest key and a Trade Manifest was presented; its signature is not checked at all, because the check that exists under a pin (manifest-key-mismatch) has no key to run against and the key the manifest carries is not a fallback for one. An audit presented with no Trade Manifest is not this condition
manifest-key-mismatch audit fails The COSE signature does not verify under the pinned publisher key, or a named refusal rejects the object. The refusal is named in the detail. A carried PEM that differs while the signature still verifies under the pin is carried-key-mismatch, not this code, and the manifest stays attributed. A presented body that differs from the decoded payload while the signature verifies is manifest-body-mismatch, not this code
manifest-body-mismatch conditional The Trade Manifest verifies under the pinned publisher key and the presented JSON body differs from the decoded payload. The unsigned surface was rewritten. The manifest stays attributed and the terms are the payload. With no publisher pin the difference is not reported
manifest-covers-no-receipt conditional A presented Trade Manifest is referenced by no presented receipt, including aborted ones and those outside the extract window; the manifest states terms no presented receipt names. It is reported on what was presented, not on whether the manifest was attributed, so it appears beside manifest-key-mismatch as well
manifest-terms-mismatch audit fails under a usable issuer pin; warning without one A receipt names this Trade Manifest but departs from the COSE payload in amount, currency, settlement time, or, where that payload states one, payee. The JSON body is not the terms when it differs from the payload. A manifest refused by a stated publisher pin is not compared at all; a gate applying MUST-T8-2 and MUST-T3-3 would have refused the payment. The two severities are the two branches of MUST-T8-9
extract-scope-mismatch audit fails A record falls outside the declared window, or the extract does not cover the expected account, rail, or window
extract-settlement-mismatch audit fails A caller-supplied settlement list disagrees with the extract on ref, amount, currency or timestamp, which are the fields compared; the extract is authoritative. A beneficiary that differs is not part of this comparison and is reached by beneficiary-mismatch, against the receipt payee
malformed-amount audit fails An amount read as a number is outside the grammar 0|[1-9][0-9]*: a receipt amount in a checkpoint window's totals (identified by the epoch), or an amount on a ref already reported as repeating (step 9)
unstated-audit-window guarantee conditional A supplied rail pin states no period, so the extract defined its own. Where no rail key is pinned at all the period is equally unstated, and unauthenticated-extract is the condition reported
unstated-audit-scope guarantee conditional A supplied rail pin states no account or no rail, so the extract defined the settlement path it reported on. The same "no pin at all" case is unauthenticated-extract
countersign-bad conditional Present payee countersignature failed verify (signature, content type, or payload binding); unattributable, discarded as approval evidence. One verifiable under another key is countersign-key-mismatch
carried-key-mismatch conditional A Spend Receipt, epoch checkpoint, countersignature, or Trade Manifest verifies under its pin but the key carried beside the signature is a different one. The unsigned surface was rewritten and the object stays attested or attributed (Section 7.3)
boundary-deferred conditional An unmatched receipt or settlement record meets t < windowStartMs + clockSkewMs or t >= windowEndMs - clockSkewMs, with no far-side cap; deferred rather than reported as a completeness failure. A timestamp outside the declared window is also extract-scope-mismatch. A settled receipt with a null rail ref is not deferred, because no row can name it. A receipt resolves or hardens against the adjacent window's extract on its side; a record resolves against a receipt in the presented bag (step 5). A record in both the inner band and the outer band of a two-window run stays pending; an inner-edge record in no outer band is otherwise the completeness finding
beneficiary-mismatch audit fails On a singular local match, a settlement record declares a beneficiary and the matched receipt's payee differs. A repeated-ref aggregate and the carried edge match do not compare beneficiary
counterparty-unbound scope record; verdict and guarantee unchanged An extract was presented, the signed manifest payload names no payee, and no settlement row declares a string beneficiary. Raised even when the comparison was skipped or the audit failed. Not raised when no extract was presented. It does not prove identity and does not say the reconciliation closed
delivery-mismatch audit fails An attributable countersignature carries deliveredHash, its receipt names a Trade Manifest the audit did not refuse, and the digest differs from the acceptance-criteria hash in that manifest's COSE payload (MAY-T8-11). Where a usable publisher pin is held, that payload's signature was checked. Where no publisher pin is held, the manifest signature is not checked; the hash is the one in the payload the receipt's manifestHash names. The JSON body's hash is not the comparison when it differs from the payload. The comparison is not made when acceptanceCriteriaHash is not 64 lowercase hex. A receipt that names no manifest, or another one, is not compared. Where a stated publisher pin refuses the manifest, its acceptance hash founds nothing and this comparison is not made (MUST-T8-9)
malformed-policy-hash (and its family: malformed-acceptance-criteria-hash, malformed-manifest-hash, malformed-prev-receipt-hash, malformed-chain-head-hash, malformed-prev-checkpoint-hash, malformed-ap-two-mandate-hash) audit fails A hash-shaped claim does not match the 64-lowercase-hex grammar of Section 7.1; the claim is named in the code. On a receipt, text whose only defect is the spelling stays in the match set. A missing hash or a number under a usable issuer pin is still this code and covering is 0. On a checkpoint the same grammar's effect under each pin state is the generated table in [CEDULON-CHECKPOINT]. On a Trade Manifest the grammar is the signed payload, and it is not read when that payload does not decode or a stated publisher pin refuses the manifest. malformed-request-hash and malformed-receipt-hash name claims the audit does not read
presented-object-malformed audit fails the audit input or its configuration could not be read; no report could be computed

The codes beginning pq- are defined in [CEDULON-PQ].

B.1. Refusals

The refusals of the Finding codes section are named, and the name travels with the condition the refused object leaves behind in the report. The reference implementation uses these:

Table 29
Refusal Raised when
cbor-too-large An input exceeds the encoded-size, element-count or string-length floor of Section 7.3.3, or an integer falls outside 0 to 2^53-1 (MUST-T4-19)
cbor-too-deep An item is nested more than 16 levels below the outermost one (MUST-T4-19)
cbor-eof The encoded item ends before its declared length
cbor-trailing Octets follow the single encoded item
cbor-duplicate-key A CBOR map repeats an encoded key (MUST-T4-18)
cbor-non-deterministic An item is not in the deterministic encoding of Section 7 (MUST-T4-1)
cbor-invalid-text A text string is not valid UTF-8
cbor-unsupported An item is a tag, a floating-point number or a simple value other than false, true and null: outside the item types of Section 7
cbor-indefinite An item uses an indefinite length or a reserved additional-information value
cbor-not-array The outermost item is not an array, so it is not a COSE_Sign1 structure
cbor-not-map The payload of a COSE_Sign1 structure is not a CBOR map, so it carries no claim map
cose-sign1-length The COSE_Sign1 array does not have four elements
cose-sign1-types The protected header, payload or signature of the COSE_Sign1 array is not a byte string
cose-protected-header The protected header is not the map Section 7 requires
cose-sign1-unprotected The unprotected header is not an empty map (MUST-T4-21)
hex-odd, hex-not-lowercase, hex-not-hex The hex text an object travels as (coseHex, not a hash claim) has an odd number of digits, an uppercase digit, or a character that is not a hex digit. Version 0.18.0 accepted some of those spellings. A hash claim outside [0-9a-f]{64} is the malformed-*-hash row, in 0.18.0 and in this revision
json-duplicate-key A JSON text repeats a member name at any depth (MUST-T4-20)
receipt-not-cose A Spend Receipt is presented in an encoding other than COSE (MUST-T4-1)
lone-surrogate A JSON text carries a lone surrogate (Section 8)
non-finite-number A JSON value to be canonicalized is a number that is not finite (NaN or an infinity), which Section 8 cannot encode. This revision names it non-finite-number. Version 0.18.0 named it non-finite number
unencodable A JSON value to be canonicalized is not a JSON value at all (undefined, a function or a symbol)
missing-extract-body The Rail Extract body is absent or is not a JSON object (Section 10)
missing-extract-accountId, -railId, -windowStartMs, -windowEndMs, -settlements A required member of the Rail Extract body is absent or not of its type (Section 10)
malformed-extract-windowStartMs, malformed-extract-windowEndMs A window bound is not a safe integer
malformed-extract-window windowEndMs is not after windowStartMs: the window declares no population
malformed-extract-clockSkewMs A declared allowance is not a non-negative safe integer
renamed-settlement-ref, -amount, -currency, -timestampMs A settlement record lacks a required member, carries it under no recognised name, or carries it as the wrong JSON type. renamed-settlement-timestampMs is a missing timestampMs or one that is not a JSON number, including the string "5". An amount outside 0|[1-9][0-9]* is renamed-settlement-amount
malformed-settlement-timestampMs, malformed-settlement-beneficiary malformed-settlement-timestampMs is a timestamp that is not a safe integer. A declared beneficiary that is not a string is malformed-settlement-beneficiary

Appendix C. Worked Example: A 10.00 TRY Spend

This appendix is informative. An agent pays 10.00 Turkish lira (TRY) for a file. Amounts are integer minor units, so the amount is 1000. The run used the companion implementation with keys generated for the run; the keys are not published, so signatures and hashes are not shown. No real rail was involved.

  1. The PDP allows the request (amount 1000, currency TRY, payee shop-1) and the adapter settles it under rail reference x402-n-10try-example-0001.

  2. The Receipt Issuer signs a Spend Receipt with these claims (policyHash omitted):

payer=agent-1   payee=shop-1   amount=1000   currency=TRY
manifestHash=null   noManifest=true
x402PaymentRef=x402-n-10try-example-0001
timestampMs=1789400600000   nonce=n-10try-example-0001
prevReceiptHash=null   outcome=settled
  1. The rail signs an extract for account acct-1, rail rail-1 and the one-hour window [1789400000000, 1789403600000), with one row: ref x402-n-10try-example-0001, amount 1000, currency TRY, timestampMs 1789400600000. The row names no beneficiary. The receipt timestamp falls inside that window. The issuer signs one checkpoint for the same hour.

  2. A verifier that holds the issuer key and the rail key, and states that account, rail and window, reconciles them. The result is balanced under an unconditional guarantee. It carries the scope record counterparty-unbound, because no manifest names a payee and the row names no beneficiary.

The same audit was then run against an extract the rail signed with a second 10.00 TRY row, ref rail-ref-unreceipted, twenty minutes into the window, that no receipt names. The verifier reported settlement-without-receipt for that ref and the audit failed. That row is the case this document exists to detect: money that left through the rail without a receipt.

The card payment that follows is not a reconciliation under this document. It was run once with real money, by a related implementation from the same author that records a spend as a signed decision and effect record rather than as the Spend Receipt of this document. On 6 September 2026 an agent asked to spend 10.00 TRY on advertising, the policy deferred the request, it was approved under the operator's account, and the amount was paid by card to the advertising platform. The next day the payer's bank statement arrived, and its line for that payment was reconciled against the approved spend: one matched, none unaccounted for. Two limits apply. The statement was received as an image rather than as a signed file from the bank, and the line was transcribed from it, so under this document the result would be conditional (unauthenticated-extract). The line also did not carry the spend reference, because the platform billed under its own descriptor, so the match rested on amount, currency and date alone. That match is the anecdote's own method. Under this document, equal amount, currency, and date with no common ref do not pass the core audit. A second row with a different ref is settlement-without-receipt.

Acknowledgments

Vernon Wharff showed that the object carrying the checkpoint guarantee was neither profiled for registration nor read during verification, and asked whether a recorded checkpoint absent from the chain deserves its own identifier. Iman Schrock confirmed that finding independently and drew its boundary.

Iman Schrock and Pablo Etcheverry ran the implementation against a pinned commit and reported defects that shaped this document. Iman Schrock found the extract-binding defects and proposed their repair, asked whether the profile should accept a pinned witness key, and corrected this document's description of what its continuous integration measures. He is also the author of [SCHROCK], cited here as adjacent work, and the reader whose independent implementation of the Signed Statement identity is noted in Section 20; he asked for it to be kept separate from any cross-implementation claim about Cedulon, and that separation is his and is recorded here as he stated it. Pablo Etcheverry found that a repeated reference hid the unaccounted amount, ran the suite on a platform its author had not, and found that nothing compared a settlement's clock to the clock of the decision that authorized it.

Nicholas Templeman ran the suite from a clean clone, corrected two claims written about that run, and classified his own run as a repetition of the author's checks rather than an independent implementation. Walter Hawkins did not run it; he pressed for the run to be stated precisely enough to be repeatable.

Tiago Pinto ran the Appendix A vectors in an independent toolchain before reading the text, confirmed the signatures, the SPKI-derived kid, and deterministic re-encoding byte for byte, and listed the places where an independent implementation could not be built from the text. The witness tiers, the key-resolution rule, the extract shape, issuer order, the boundary allowance, and the countersignature and delivery bindings follow that list, and Section 7.3 answers a later point of his. He consented to that run being recorded as the first run of these vectors outside the companion codebase and not as an independent implementation.

Steven Mih and Anton Sokolov published the canonicalization vectors of [CPB]; running them through this profile's [RFC8785] encoder put the I-JSON precondition on the page as a rule.

None of them reviewed this text, and any error in it is the author's.

Field survey notes and the informative threat-model narrative in the companion repository helped shape the requirement identifiers used here. Those identifiers are defined in Section 15 and, for T11, in [CEDULON-CHECKPOINT].

Author's Address

Emek Can Dogru
VERAX TEKNOLOJI LIMITED SIRKETI