Chio/Docs
LOGIN · JOIN

Receipt Format

Find any receipt field, decision variant, metadata block, or verification rule, and see which signed bytes each one covers.

Reference chio@5f63e6e

On this page

For every decision it makes on a call, the kernel signs one ChioReceipt: the capability presented, the request, the verdict, the policy in force, and the key that signed it.

Fields, enums, metadata blocks, and verifier checks are read from the receipt types in the Chio source. The two receipts shown come from the first-call example: an allowed hello_world call and a refused drop_tables call. Receipts explains what a receipt establishes about a call.

Synopsis

ChioReceipt binds a request, the kernel's decision or observation, and the execution context into one signed, content-addressed record. The same record carries guard evidence, delivery commitments, spending authority, and settlement metadata. The format is chio.receipt.v1, a schema name with no matching top-level schema or version field. The wire record is flat, its schema rejects unknown top-level fields, and signing rebuilds this nested payload from those fields:

Receipt identitytext
id = SHA-256(canonical_json(ChioReceiptIdInput))

signed payload = {
  id,
  body: ChioReceiptIdInput,
  bbs_signature?           // included when present
}

signature = sign(canonical_json(signed payload))

The smallest complete record is the allowed call that the first-call example captured from the installed chio. The inspector recomputes its id and parameter hash from the receipt alone.

The allow receipt the first-call example captured, with the id selected. The id is the SHA-256 of the RFC 8785 canonical JSON of ChioReceiptIdInput, recomputed from the receipt alone.
Source
Complete Rust record shape
ChioReceipt · record shaperust
// schema: chio.receipt.v1
pub struct ChioReceipt {
    pub id: String,
    pub timestamp: u64,
    pub capability_id: String,
    pub tool_server: String,
    pub tool_name: String,
    pub action: ToolCallAction,
    pub decision: Option<Decision>,  // omitted when None
    pub receipt_kind: ReceiptKind,
    pub boundary_class: BoundaryClass,
    pub observation_outcome: Option<ObservationOutcome>,  // omitted when None
    pub tool_origin: ToolOrigin,
    pub redaction_mode: RedactionMode,
    pub actor_chain: Vec<ActorRef>,  // omitted when empty
    pub content_hash: String,
    pub policy_hash: String,
    pub evidence: Vec<GuardEvidence>,  // omitted when empty
    pub metadata: Option<serde_json::Value>,  // omitted when None
    pub trust_level: TrustLevel,
    pub tenant_id: Option<String>,  // omitted when None
    pub bbs_projection_version: Option<String>,  // omitted when None
    pub kernel_key: PublicKey,
    pub bbs_signature: Option<BbsReceiptSignature>,  // omitted when None
    pub algorithm: Option<SigningAlgorithm>,  // omitted when None or ed25519
    pub signature: Signature,
}

Fields and serialization omissions are read from crates/core/chio-core-types/src/receipt/body.rs.

ChioReceipt fields

The record has 24 fields. 20 enter the id preimage, and 22 can fall under the signed payload, counting optional BBS material. Optional fields leave the wire under their serialization rules, and the receipt kind adds requirements of its own.

FieldIn idSigned
no
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
no
yes
no
no
no
no

id

StringOutside id · signed · never omitted

Required. Exactly 64 lowercase hex characters: the SHA-256 of the canonical ChioReceiptIdInput. The id is signed and sits outside its own preimage. Read Receipt id and signing.

Captured"448440b65fa15559a364d24512cbe4f08631befe2c3d2ab471dad7204b8b69c8"

timestamp

u64In id · signed · never omitted

Required. Nonnegative Unix time in seconds, recorded by the signer. The signature binds this value; an independent trusted-time claim requires additional evidence.

Captured1788529911

capability_id

StringIn id · signed · never omitted

Required, nonempty string. Identifies the capability presented for evaluation, including on a refused attempt.

Captured"cap-01a06cb0-a7d2-7e10-b32d-b985627e17e7"

tool_server

StringIn id · signed · never omitted

Required, nonempty string. Identifies the target server, including on a refused call; the field alone does not establish that dispatch occurred.

Captured"hello"

tool_name

StringIn id · signed · never omitted

Required, nonempty string. Identifies the requested tool, including on a refused invocation.

Captured"hello_world"

action

ToolCallActionIn id · signed · never omitted

Required object containing parameters and parameter_hash. Parameters may be any JSON value; parameter_hash is the SHA-256 of their canonical JSON. Read ToolCallAction.

Captured{"parameters":{"name":"Chio"},"parameter_hash":"319910ed4307f4c6486b4d282a01d4276a7aec7626c66be0f7eb2173d4a973a3"}

decision

Option<Decision>In id · signed · omitted when None

Required for mediated_decision; absent for trace_observation and advisory_evaluation. The verdict selects allow, deny, cancelled, or incomplete and its required payload. Read Decision.

Captured{"verdict":"allow"}

receipt_kind

ReceiptKindIn id · signed · never omitted

Required. Selects the signed semantic class and constrains the boundary, trust level, and outcome fields. Read ReceiptKind.

Captured"mediated_decision"

boundary_class

BoundaryClassIn id · signed · never omitted

Required: prevent, detect_only, or advisory_only. cannot_see is planning metadata, rejected on signed runtime receipts. Read BoundaryClass.

Captured"prevent"

observation_outcome

Option<ObservationOutcome>In id · signed · omitted when None

Required for trace and advisory records; absent for mediated decisions. Values: observed, evaluated, or dropped. Read ObservationOutcome.

tool_origin

ToolOriginIn id · signed · never omitted

Required. Classifies where the effect executed relative to Chio, alongside the receipt's boundary class and decision. Read ToolOrigin.

Captured"caller_executed"

redaction_mode

RedactionModeIn id · signed · never omitted

Required: none, summary, or redacted. Describes the disclosure of receipt details. Read RedactionMode.

Captured"none"

actor_chain

Vec<ActorRef>In id · signed · omitted when empty

Optional array, omitted when empty. Each actor requires a nonempty actor_id and may carry a nonempty actor_kind. Attribution grants no authority.

content_hash

StringIn id · signed · never omitted

Required, 64 lowercase hex characters. Binds the evaluated content. Recompute it against the original content preimage when that content is available. Read Receipt id and signing.

Captured"8813cfed2cad28d238168ce79dde8ff3b39d38f2a5bea3661c7726d63f69f5ad"

policy_hash

StringIn id · signed · never omitted

Required, nonempty string: a policy digest or a symbolic version identifier. The wire schema accepts any nonempty string here, hexadecimal or otherwise. Read Field relationships.

Captured"69e943b96e9ce64d0264bb56bf8930e77bd4e68adf68fcf1395790dae03e6b55"

evidence

Vec<GuardEvidence>In id · signed · omitted when empty

Optional array, omitted when empty. Contains the guard evaluations collected on this path; a refusal before the guard pipeline has no entries. Read GuardEvidence.

metadata

Option<serde_json::Value>In id · signed · omitted when None

Optional JSON value. Kernel-owned blocks bind admission, attribution, delivery, spending, and settlement evidence into the receipt. Reserved keys have specific collision rules. Read Kernel metadata blocks.

trust_level

TrustLevelIn id · signed · never omitted

Required. Signing pairs mediated_decision with mediated, trace_observation with verified, and advisory_evaluation with advisory. The value is a semantic classification, separate from trust in the signer. Read Semantic pairings.

Captured"mediated"

tenant_id

Option<String>In id · signed · omitted when None

Optional nonempty string. Derived from authenticated enterprise identity in multi-tenant deployments; caller-supplied request fields must not choose the tenant.

bbs_projection_version

Option<String>In id · signed · omitted when None

Present together with bbs_signature. The fixed value is chio.bbs-projection.receipt.v1, and it is part of the content-addressed id. Read Field relationships.

kernel_key

PublicKeyIn id · signed · never omitted

Required encoded public key, covered by both the id and the signature. Compare it with independently configured trusted keys before relying on the receipt. Read Verification.

Captured"e08d69a6a3bf74cf4971a7e0a1ff3f566129fad32ec5580c3342316859ecf436"

bbs_signature

Option<BbsReceiptSignature>Outside id · signed · omitted when None

Optional BBS material for selective disclosure. Outside the id preimage, inside ChioReceiptSigningBody, and covered by the outer signature. Requires bbs_projection_version. Read Receipt id and signing.

algorithm

Option<SigningAlgorithm>Outside id · unsigned · omitted when None or ed25519

Optional envelope hint: ed25519, p256, p384, or hybrid. Rust serialization omits an unset or Ed25519 hint. The hint sits outside the signed payload; verification dispatches from the encoded signature material. Read Key and signature encodings.

signature

SignatureOutside id · unsigned · never omitted

Required encoded signature over the canonical ChioReceiptSigningBody. Its value sits outside the payload it authenticates. Read Key and signature encodings.

Captured"676bef1ac96b8519f5b316a98c05de7b46300e06983e0da58bb70db6d6c02f619222d07e44da61f2ca689015ab731d9c9e7727aeb826ad4690a2428f9fa82a01"

Field relationships

Validate related fields together. The record schema states their wire requirements; the Rust signing and verification paths enforce the signed semantics.

receipt_kind, boundary_class, trust_level
Match one of the three semantic pairings. Mediated records carry a decision; trace and advisory records carry an observation outcome.
bbs_projection_version, bbs_signature
Both present or both absent. The version is chio.bbs-projection.receipt.v1. The version enters the id; the BBS material falls under the outer signature.
algorithm, signature
verify_signature_with_floor returns AlgorithmMismatch when the hint disagrees with the signature material. Plain verify_signature ignores the envelope hint.
content_hash, supplied output
The kernel hashes the original canonical content preimage before signing: canonical JSON for a value output, the per-chunk digest preimage for a stream, canonical null for an empty output. An independent check of the output commitment needs that preimage.

Decision

Decision is an internally tagged enum. The tag field is verdict, and variant names serialize in snake_case.

Wire valueVariantPayloadDoc
allow
Allow
none
The tool call was allowed and executed.
deny
Deny
reason (String): Human-readable reason for the denial., guard (String): The guard or validation step that triggered the denial.
The tool call was denied.
cancelled
Cancelled
reason (String): Human-readable reason for the cancellation.
The tool call was interrupted by explicit cancellation.
incomplete
Incomplete
reason (String): Human-readable reason for the incomplete terminal state.
The tool call did not reach a complete terminal result.

The specification keeps cancelled and incomplete outcomes as distinct verdicts, separate from any error state.

The refused call the first-call example captured records its reason in decision.reason. Its guard is kernel, and the receipt carries no evidence entries: capability-scope validation refused the call before the guard pipeline ran.

quickstart · check-denytranscript
$ chio --receipt-db .chio/receipts.db --session-db "$(mktemp -d)/admission.db" check \
    --policy ./policy.yaml --server hello --tool drop_tables --params '{}'
verdict:    DENY
tool:       drop_tables
server:     hello
reason:     requested tool drop_tables on server hello is not in capability scope
receipt_id: 28b6e2576ca2ccbd031e769d8d2bd504317161115a600f27771a7f932307a284
policy:     69e943b96e9ce64d0264bb56bf8930e77bd4e68adf68fcf1395790dae03e6b55
source:     0d35135e8b19230b7aa42b0cc5982579450f5dc4a0280822e8b339e7786d2296
mode:       preflight
fixture:    false
WARN chio_kernel::kernel::evaluation::async_evaluation_core message=capability rejected request_id=check-001 reason=requested tool drop_tables on server hello is not in capability scope
exit 2denyin my-agent
The deny receipt the first-call example captured, annotated from the ChioReceipt struct with the id and the parameter hash recomputed. The selected field is the reason the kernel recorded for the refusal.
Source

ToolCallAction

The action the kernel evaluated.

FieldTypeDocOmitted
parametersserde_json::ValueThe parameters that were passed to the tool (or attempted).never
parameter_hashStringSHA-256 hash of the canonical JSON of `parameters`.never

ToolCallAction::from_parameters computes parameter_hash as the SHA-256 of the RFC 8785 canonical JSON of parameters, and verify_hash recomputes it. The schema fixes the hash at 64 lowercase hex characters. The receipt inspectors under Synopsis and Decision recompute it from the captured receipts.

GuardEvidence

One entry per guard that evaluated the call. The evidence array leaves the wire when it is empty, so the two captured receipts carry none.

FieldTypeDocOmitted
guard_nameStringName of the guard (e.g. "ForbiddenPathGuard").never
verdictboolWhether the guard passed (true) or denied (false).never
detailsOption<String>Optional details about the guard's decision.when None

Signed semantic fields

Six enums classify what a receipt claims. Each serializes in snake_case, and each value is under the signature.

ReceiptKind

Wire valueVariantMeaning
mediated_decision
MediatedDecision
The default. A kernel decision on a governed call.
trace_observation
TraceObservation
An observed call the kernel did not mediate.
advisory_evaluation
AdvisoryEvaluation
An evaluation the caller may have ignored.

BoundaryClass

Wire valueVariantMeaning
prevent
Prevent
The default. The kernel could stop the call.
detect_only
DetectOnly
The kernel could observe and record the call, without the means to stop it.
advisory_only
AdvisoryOnly
The kernel could advise only.
cannot_see
CannotSee
Planning metadata. Refused on a signed receipt.

ObservationOutcome

Wire valueVariantMeaning
observed
Observed
Outcome of a non-mediated observation.
evaluated
Evaluated
The observation was evaluated.
dropped
Dropped
The observation was dropped.

ToolOrigin

Wire valueVariantMeaning
caller_executed
CallerExecuted
The default. Where the tool effect executed relative to Chio.
host_executed_provider_reported
HostExecutedProviderReported
The host executed the tool and the provider reported it.
host_executed_unmediated
HostExecutedUnmediated
The host executed the tool without mediation.

RedactionMode

Wire valueVariantMeaning
none
None
The default. Redaction applied to signed or exported receipt details.
summary
Summary
Details reduced to a summary.
redacted
Redacted
Details redacted.

TrustLevel

Wire valueVariantMeaning
mediated
Mediated
Required for mediated_decision. The decision still determines whether the call was allowed, denied, cancelled, or incomplete.
verified
Verified
Required for trace_observation. Identifies observation evidence, separate from authorization and from trust in the signer.
advisory
Advisory
Required for advisory_evaluation. The kernel evaluated a request while the caller retained the ability to proceed.

Semantic pairings

validate_decision and validate_signable_semantics accept exactly these combinations, and the record schema states the same rule as conditional requirements.

receipt_kindboundary_classtrust_levelobservation_outcomedecision
mediated_decision
prevent
mediated
absent
present
trace_observation
detect_only
verified
present
absent
advisory_evaluation
advisory_only
advisory
present
absent

is_authorized is true only for mediated_decision with prevent, no observation outcome, and an allow decision. ChioReceipt::is_allowed adds trust_level == mediated.

result_label renders that case as Authorized. A trace record is Observed and an advisory record Advisory; any other mediated decision is Allowed, Denied, Cancelled, or Incomplete, and a mediated record with no decision is Invalid. Trace and advisory records are evidence, never authorization.

Kernel metadata blocks

The kernel writes its typed blocks under reserved top-level metadata keys. Each producer applies its merge or collision rule before signing. A verifier checks the block's typed contract and trusts the enclosing receipt's signer; the key's presence alone carries no authority.

The admission terminal enforces the collision rejection for delivery_contract, finding_delivery, and finding_recovery. The allow path merges attribution after caller metadata, with the last write winning on each nested key. The keys chio-core-types declares, read from its constants:

KeySchemaDocDefined in
admission_operation
chio.admission-receipt.v1
crates/kernel/chio-kernel/src/admission_operation.rs
attribution
none
Universal receipt-side attribution for capability context. This metadata gives downstream analytics a deterministic local join path from a receipt to the capability subject and, when available, the matched grant within the capability scope.
metadata.rs
budget_authority
none
Budget-authority lineage metadata block key for monetary receipts.
metadata.rs
channel
none
Streamed-output channel accounting metadata block key.
metadata.rs
chio_receipt_signing_nonce
none
The caller-supplied body.id, folded into the id input and therefore into the signed bytes before the content-addressed id is computed.
signing.rs
delivery_contract
chio.delivery-contract.v1
Delivery-contract evidence metadata block key (ADR-0018 item 7).
metadata.rs
financial
none
Financial attribution and settlement metadata block key.
metadata.rs
finding_delivery
chio.finding.delivery.v1
Finding-delivery overlay metadata block key.
metadata.rs
finding_recovery
chio.finding.recovery.v1
Finding-recovery receipt metadata block key.
metadata.rs
governed_transaction
none
Governed-transaction intent and approval metadata block key.
metadata.rs
original_metadata
none
signing.rs

Two reserved keys in the specification are defined outside those constants. original_metadata is written by the signing path when a caller passed a non-object metadata value: the value moves under that key before the nonce is inserted. admission_operation is ADMISSION_RECEIPT_METADATA_KEY with schema ADMISSION_RECEIPT_SCHEMA, declared in the kernel's admission module. Keys outside the reserved set, such as the receipt_context block the captured receipts carry, have no typed reader in chio-core-types.

admission_operation

A durable governed call carries an admission_operation block with schema chio.admission-receipt.v1. It binds the signed receipt to the admission operation and request namespace, the terminal projection and dispatch state, trusted time, the coordinator lease and store fence, the retained dispatch commit, and the optional tool outcome. Unknown fields and unsupported schema versions fail closed.

The typed writer is AdmissionReceiptMetadataV1, declared deny_unknown_fields. The wire contract is admission-metadata.schema.json, which requires every field below.

FieldSchema shape
schema
const chio.admission-receipt.v1
operation_id
64-hex digest
request_id
identifier, 1 to 512 characters
request_namespace_digest
64-hex digest
request_binding_hash
64-hex digest
projected_operation_version
positive I-JSON integer
projected_state
one of the admission states listed below
projected_dispatch_state
not_committed, capture_pending, committed, finalizing, terminal, or not_applicable
trusted_time_unix_ms
positive I-JSON integer
coordinator_lease_id
identifier
coordinator_lease_epoch
positive I-JSON integer
store_fence
object { store_uuid, lease_id, owner_epoch }
retained_dispatch_commit
null or { committed_version, coordinator_lease_id, coordinator_lease_epoch, store_fence, provider_attempt }, where provider_attempt is null or { operation_id, attempt_id, transport_id, transport_key_epoch }
compensation_status
not_compensated, compensated_before_dispatch, or not_accepted_after_dispatch_commit
tool_outcome_id
null or a 64-hex digest
tool_outcome_version
null or a positive I-JSON integer

projected_state takes the wire name of one of the 18 states of AdmissionOperationState, 7 of them terminal. The allow receipt under Synopsis carries this block with projected_state completed.

Wire valueVariantPre-dispatchTerminal
prepared
Prepared
yes
no
broker_attempt_registered
BrokerAttemptRegistered
yes
no
approval_required
ApprovalRequired
yes
no
budget_authorized
BudgetAuthorized
yes
no
approval_reserved
ApprovalReserved
yes
no
ready_to_dispatch
ReadyToDispatch
yes
no
capture_pending
CapturePending
yes
no
dispatch_committed
DispatchCommitted
no
no
finalizing
Finalizing
no
no
completed
Completed
no
yes
compensated_before_dispatch
CompensatedBeforeDispatch
no
yes
not_accepted_after_dispatch_commit
NotAcceptedAfterDispatchCommit
no
yes
outcome_unknown_after_dispatch
OutcomeUnknownAfterDispatch
no
yes
denied_after_delivery
DeniedAfterDelivery
no
yes
mutation_ready
MutationReady
no
no
mutation_submitted
MutationSubmitted
no
no
economic_mutation_applied
EconomicMutationApplied
no
yes
economic_mutation_not_applied
EconomicMutationNotApplied
no
yes

delivery_contract

A digest-constrained governed call carries a delivery_contract block with schema chio.delivery-contract.v1: the expected_digest the grant fixed in advance, the observed_digest of the delivered output, both canonical lowercase 64-character hex SHA-256, and a result of matched or mismatched. The block appears only when the exercised grant carried an output-digest constraint: matched accompanies an Allow, and mismatched accompanies the persisted zero-charge Deny. The enclosing receipt authenticates the block, which carries no signature of its own.

The typed struct is DeliveryContract, declared deny_unknown_fields. On a mismatch, observed_digest is a domain-separated commitment keyed by the expected digest, and the delivered output digest stays in privileged durable outcome evidence. DeliveryContract::validate checks the pinned schema and both hex digests and leaves result as recorded; ChioReceipt::delivery_contract reads the block. Delivery contract covers the digest comparison behind it.

finding_delivery

A reveal admitted under a provider-signed finding purchase marker carries a finding_delivery block beside the generic one, schema chio.finding.delivery.v1. It names the finding_id and listing_id the sale was admitted under, the kernel-proved transform_profile, the digest_check and media_type_check comparisons, the settlement_mode the admitted selector named, the canonical SHA-256 digests of the accepted-bid and venue-admission envelopes, and the authoritative reservation_id, purchase_intent_id, and authoritative_payment_operation_id. Every field derives from kernel-verified state, never from a caller-asserted value, and the block appears only when the purchase context arrived through verified signed records.

The struct is FindingDelivery. Its enums: transform_profile is identity; digest_check is matched or mismatched; media_type_check is matched, mismatched, or not_evaluated; settlement_mode is local_reversible_hold. An optional status_proof carries the kernel-verified non-inclusion evidence for the delivered finding: feed_id, key_domain_nonce (the fixed constant 3318287169837494), map_epoch, status_epoch_artifact_sha256, proof_sha256, root_hash, and non_inclusion_checked_at.

A no-charge redelivery under a recovery grant carries finding_recovery instead, schema chio.finding.recovery.v1, with recovery_id, finding_id, original_capability_id, original_delivery_receipt_id, and purchase_key.

budget_authority

A monetary receipt carries a budget_authority block with the budget hold lineage. The typed reader is FinancialBudgetAuthorityReceiptMetadata: guarantee_level, authority_profile, metering_profile, hold_id, optional budget_term, optional authority ({ authority_id, lease_id, lease_epoch }), authorize (optional event_id and budget_commit_index, exposure_units, committed_cost_units_after), and optional terminal (disposition, the same event fields, exposure_units, realized_spend_units, committed_cost_units_after).

The kernel writes the block in two shapes. The store profile alone (guarantee_level, authority_profile, metering_profile) comes from budget_backend_receipt_metadata. A charge writes the full lineage through budget_execution_receipt_metadata, which also adds invocation_capture when a quota was captured and, when an execution nonce was presented, execution_nonce_id and mediated_spend.profile. The typed reader skips keys it does not declare, and ChioReceipt::financial_budget_authority_metadata reads the block. Authoritative Spend covers the checks over this block and the execution nonce.

Other reserved keys

  • attribution: ReceiptAttributionMetadata, with the capability's subject_key and issuer_key, delegation_depth, and grant_index when the request resolved to one grant. The kernel writes it on every allow and deny it signs from a capability. Both captured receipts carry it.
  • chio_receipt_signing_nonce: bound by bind_receipt_signing_nonce before the id is computed, as Receipt id and signing describes.
  • financial and governed_transaction: the two sections that follow.
  • channel: ChannelReceiptMetadataV1, camelCase and deny_unknown_fields, with schema pinned to chio.channel.receipt-metadata.v1, channelId, openDigest, reservationId, reservationDigest (each 64 lowercase hex), sequence (a positive I-JSON integer), and settlementMode channelized.

Financial metadata

For an allow receipt under a monetary grant, the kernel serializes FinancialReceiptMetadata under the financial key. A refusal caused by budget exhaustion carries attempted_cost with the cost that would have been charged. ChioReceipt::financial_metadata reads the block.

FieldTypeDoc
grant_index
u32
Index of the matching grant in the capability token scope.
cost_charged
u64
Cost charged for this invocation in currency minor units (cents for USD).
currency
String
ISO 4217 currency code.
budget_remaining
u64
Remaining budget after this charge, in minor units.
budget_total
u64
Total budget for this grant, in minor units.
delegation_depth
u32
Depth of the delegation chain at the time of invocation.
root_budget_holder
String
Identifier of the root budget holder in the delegation chain.
payment_reference
Option<String>
Payment reference for external settlement systems. Omitted when None.
settlement_status
SettlementStatus
Settlement status for this charge.
cost_breakdown
Option<serde_json::Value>
Itemized cost breakdown for audit purposes. Omitted when None.
oracle_evidence
Option<OracleConversionEvidence>
Oracle price evidence used for cross-currency conversion. Omitted when None.
attempted_cost
Option<u64>
Cost that was attempted and refused; populated only on deny receipts. Omitted when None.

The struct documents three invariants the kernel upholds when it builds the block, beyond what the type system checks: cost_charged <= budget_total; budget_remaining reflects the post-charge balance at write time and may be a best-effort snapshot at read time under an HA split; and on a refusal cost_charged is 0 and attempted_cost holds the rejected cost.

SettlementStatus

Wire valueVariantMeaning
not_applicable
NotApplicable
No external settlement applies to this receipt, for example a pre-execution refusal.
pending
Pending
Settlement is initiated and awaiting finality.
settled
Settled
The recorded charge is final for the current execution path.
failed
Failed
Execution completed, but settlement failed or became invalid.

OracleConversionEvidence

The cross-currency conversion evidence under financial.oracle_evidence. The struct is deny_unknown_fields, its schema is the constant chio.oracle-conversion-evidence.v1, and its field names and types are the contract, with no per-field doc comments.

FieldType
schema
String
base
String
quote
String
authority
String
rate_numerator
u64
rate_denominator
u64
source
String
feed_address
String
updated_at
u64
max_age_seconds
u64
cache_age_seconds
u64
converted_cost_units
u64
original_cost_units
u64
original_currency
String
grant_currency
String
oracle_public_key
Option<PublicKey>, omitted when None
signature
Option<Signature>, omitted when None

Governed transaction metadata

A request that carried a governed intent gets a governed_transaction block holding the intent identifiers and the approval, commerce, metering, runtime-assurance, call-chain, and autonomy evidence the kernel verified. The struct is GovernedTransactionReceiptMetadata; the kernel assembles it in governed_request_metadata and reads it back through ChioReceipt::governed_transaction_metadata.

intent_idString
Governed transaction intent identifier.
intent_hashString
Canonical intent hash used for approval-token binding.
purposeString
Human or policy-readable purpose.
server_idString
Target tool server from the intent.
tool_nameString
Target tool name from the intent.
max_amountOption<MonetaryAmount>
Explicit spend bound carried on the intent: { units, currency } in minor units.
commerceOption<GovernedCommerceReceiptMetadata>
Seller-scoped commerce approval evidence: seller, shared_payment_token_id, optional settlement_destination_ref.
metered_billingOption<MeteredBillingReceiptMetadata>
camelCase: settlementMode, quote, optional maxBilledUnits, optional usageEvidence (evidenceKind, evidenceId, observedUnits, optional evidenceSha256). The kernel writes no usage evidence at signing time.
approvalOption<GovernedApprovalReceiptMetadata>
token_id, approver_key (hex), optional approval_artifact_digest, approved. A threshold-approval proposal fills it with the proposal id and the policy authority key.
runtime_assuranceOption<RuntimeAssuranceReceiptMetadata>
camelCase: schema, optional verifierFamily, tier (the tier accepted after any verifier trust-policy rebinding), verifier, evidenceSha256, optional workloadIdentity.
call_chainOption<GovernedCallChainProvenance>
camelCase: evidenceClass, evidenceSources, optional upstreamProof, assertedContext, continuationTokenId, sessionAnchorId, receiptLineageStatementId, plus the flattened context chainId, parentRequestId, optional parentReceiptId, originSubject, delegatorSubject. The flattened fields are the effective projection; a preserved caller assertion sits under assertedContext and is unverified.
autonomyOption<GovernedAutonomyReceiptMetadata>
camelCase: tier, optional delegationBondId.
economic_authorizationOption<EconomicAuthorizationReceiptMetadata>
The versioned economic envelope below.

economic_authorization

EconomicAuthorizationReceiptMetadata keeps budget, meter, rail, and settlement facts in separate typed sub-blocks, serialized in snake_case. It is additive: the financial, commerce, metered_billing, approval, runtime_assurance, call_chain, and autonomy fields stay beside it.

The kernel attaches the envelope only when the request carried a governed intent and a verified payee binding. It refuses to sign when the binding disagrees with the intent digest, the seller, the settlement destination, or the approval digest.

versionEconomicAuthorizationReceiptMetadataVersion
Serialized v1.
economic_intent_digestOption<String>
Omitted when None. The kernel sets it from the verified payee binding.
payee_binding_digestOption<String>
Omitted when None. Set from the payee binding.
pre_action_authority_digestOption<String>
Omitted when None. Set from the payee binding.
credit_authority_digestOption<String>
Omitted when None. The kernel leaves it unset.
economic_modeEconomicAuthorizationMode
budget_only, prepaid_fixed, hold_capture, metered_hold_capture, or external_dispatch; chosen from the metered settlement mode, else from the presence of a payment reference.
payerEconomicPayerReceiptMetadata
party_id, funding_source_ref, optional custody_provider, optional obligor_ref.
merchantEconomicMerchantReceiptMetadata
merchant_id, optional merchant_of_record, optional order_ref.
payeeEconomicPayeeReceiptMetadata
beneficiary_id, settlement_destination_ref.
railEconomicRailReceiptMetadata
kind, asset, optional network, facilitator, contract_or_account_ref. The kernel writes kind shared_payment_token.
amount_boundsEconomicAmountBoundsReceiptMetadata
approved_max, optional hold_amount, settlement_cap, each a MonetaryAmount.
pricing_basisOption<EconomicPricingBasisReceiptMetadata>
Optional quote_hash, tariff_hash, quote_expiry. Omitted when None.
meteringOption<EconomicMeteringReceiptMetadata>
provider, meter_profile_hash, optional max_billable_units, optional billing_unit. Omitted when None.
liability_refsOption<EconomicLiabilityReceiptMetadata>
Optional bond_id, policy_id, indemnity_ref, dispute_policy_ref. Omitted when None; the kernel leaves it unset.
budgetEconomicBudgetReceiptMetadata
grant_index, cost_charged, currency, budget_remaining, budget_total, delegation_depth, root_budget_holder, optional attempted_cost, copied from the financial block.
settlementEconomicSettlementReceiptMetadata
settlement_status.

Receipt id and signing

Receipt envelopeChoose a boundary.
ProducerVerifierProducerVerifier

One signature covers the id, the body, and any BBS material

ChioReceiptSigningBody is { id, body, bbs_signature? }. The kernel signs its canonical JSON with the kernel key, and the body carries that key as kernel_key, so changing any covered value fails verification. Receipt id and signing.

The byte boundaries of one v1 receipt: the id preimage, the signing body the kernel key signs, the flat wire record, and the configuration the verifier brings. Field values, metadata blocks, and the cryptographic check of a BBS proof are left out.

The kernel checks the content preimage before it prepares or signs the receipt body. Preparation validates the semantics, binds the caller nonce, and derives the id; the final signature authenticates the rebuilt signing payload.

  1. Check the content and signer binding. chio_kernel_core::receipts::sign_receipt recomputes content_hash from the supplied canonical content preimage. A mismatch returns ContentHashMismatch, and a body key that differs from the backend key returns KernelKeyMismatch. Both checks run before signing.
  2. Validate the semantics. validate_signable_semantics rejects a body whose kind, boundary, observation outcome, decision, and trust level fall outside the accepted pairings.
  3. Bind the signing nonce. bind_receipt_signing_nonce takes the caller-supplied body.id, trimmed, and writes it to metadata.chio_receipt_signing_nonce. A non-object metadata value moves under original_metadata first, and an empty id skips the binding. Because metadata is in the id preimage, the nonce falls under the id and the signature.
  4. Compute the id. id = sha256_hex(canonical_json_bytes(ChioReceiptIdInput)) over the nonce-bound body. Canonical JSON is RFC 8785: keys sorted, no whitespace, deterministic number formatting. The preimage holds the 20 body fields, including kernel_key and the optional BBS projection version, and leaves out the id and all signature material.
  5. Sign the signing body. ChioReceiptSigningBody is { id, body: ChioReceiptIdInput, bbs_signature? }, and its canonical JSON is signed with the kernel key. ChioReceipt::sign with an Ed25519 keypair leaves algorithm unset, and sign_with_backend records the backend algorithm. Both refuse a kernel_key that differs from the signer key.

The wire record then adds the optional algorithm hint and the outer signature, both outside the signed payload. sign_receipt_with_handle consumes a one-time ReceiptSigningHandle, so one handle backs at most one signature.

Transport adapters use a distinct path: sign_receipt_relaying_trusted_body accepts the content hash the upstream caller already computed. That FFI and WASM relay signs the hash as given, without reconstructing the content preimage.

Key and signature encodings

kernel_key and signature are hex strings whose prefix selects the algorithm. Bare hex is Ed25519 (32-byte key, 64-byte signature); p256: and p384: select ECDSA with an uncompressed SEC1 point as the key and DER as the signature; hybrid: carries a classical part, ML-DSA-65 bytes, and the algorithm set. PublicKey::from_hex, Signature::from_hex, and to_hex implement the encodings, and the record schema fixes the wire patterns:

Wire patternstext
kernel_key  ^([0-9a-f]{64}|p256:04[0-9a-f]{128}|p384:04[0-9a-f]{192}|hybrid:[0-9a-f]{64}:[0-9a-f]{3904}:ed25519\+mldsa65|hybrid:p256:04[0-9a-f]{128}:[0-9a-f]{3904}:p256\+mldsa65|hybrid:p384:04[0-9a-f]{192}:[0-9a-f]{3904}:p384\+mldsa65)$
signature   ^([0-9a-f]{128}|p256:([0-9a-f]{2})+|p384:([0-9a-f]{2})+|hybrid:[0-9a-f]{128}:[0-9a-f]{6618}:ed25519\+mldsa65|hybrid:p256:([0-9a-f]{2})+:[0-9a-f]{6618}:p256\+mldsa65|hybrid:p384:([0-9a-f]{2})+:[0-9a-f]{6618}:p384\+mldsa65)$

Verification dispatches off the signature material, and verify_signature_with_floor applies a ReceiptCryptoFloor before the cryptographic check: allow_classical (the default) rejects hybrid receipts, pq_required rejects classical ones, and allow_hybrid accepts both.

Verification

Verify the record's integrity against its embedded key, then decide whether your deployment trusts that key. ChioReceipt::verify_signature runs four checks in order, and a failed check verifies as false:

  1. Semantics. validate_signable_semantics on the extracted body; a rejected pairing verifies as false.
  2. BBS binding. validate_bbs_receipt_binding between bbs_projection_version and bbs_signature. It checks the binding and the material's shape; cryptographic verification of the BBS proof is a separate step.
  3. Id. chio_receipt_id(body) must equal id, so a tampered identity-defining field verifies as false.
  4. Signature. kernel_key.verify_canonical over the rebuilt ChioReceiptSigningBody.

ToolCallAction::verify_hash checks parameter_hash separately. Trusted kernel keys and accepted algorithms come from the verifier's own configuration: compare kernel_key with your trust store, because a receipt cannot establish its own signer's authority.

The signature authenticates the recorded content_hash. To check an output supplied separately, rebuild and hash that output's content preimage. A valid signature leaves the output's truth, the log's completeness, and effects outside the recorded mediation boundary to other evidence, as the assurance model sets out.

TypeScript verifier

verifyReceipt(receipt, trustedSigners) in @chio-protocol/sdk/invariants is synchronous and returns a ReceiptVerification with snake_case fields. signature_valid requires the id to verify and the semantics to be signable. signer_trusted is true only when kernel_key matches a supplied signer, so ok is false for an empty trusted set. authorized adds the mediated-decision, prevent, and allow test.

A signature in an algorithm the SDK does not implement verifies as false instead of throwing. verifyReceiptJson parses and verifies text with no trusted signers. parseReceiptJson parses JSON syntax and casts the result without validating the receipt schema, and structurally malformed input can throw before the cryptographic check, so validate the record shape at ingestion.

The helper's id and signing-body projections omit the BBS fields. Use it for receipts without BBS material, and verify BBS-bound records with the Rust verifier.

inspect-receipt.tstypescript
import {
  type ChioReceipt,
  verifyReceipt,
} from "@chio-protocol/sdk/invariants";

// Precondition: validate the wire schema at ingestion.
// This helper supports receipts without BBS material.
export function inspectReceipt(
  receipt: ChioReceipt,
  trustedKernelKeys: string[], // from deployment configuration
) {
  const result = verifyReceipt(receipt, trustedKernelKeys);

  if (!result.ok) throw new Error("Receipt integrity or signer trust failed");

  // A trusted denial passes integrity checks but is not authorization.
  return { authorized: result.authorized, outcome: result.result };
}

Evidence export

chio evidence export writes a verifiable package from the receipt store. The export takes the same tenant boundary as a listing, --tenant or --admin-all, and --require-proofs fails it when a selected receipt lacks checkpoint coverage.

evidence · exporttranscript
$ chio --receipt-db .chio/receipts.db evidence export --admin-all --output ./evidence
$ ls evidence
README.txt
capability-lineage.ndjson
checkpoint-consistency-proofs.ndjson
checkpoint-equivocations.ndjson
checkpoint-publications.ndjson
checkpoint-witnesses.ndjson
checkpoints.ndjson
child-receipts.ndjson
inclusion-proofs.ndjson
manifest.json
query.json
receipts.ndjson
retention.json
exit 0in my-agent

Evidence verification

chio evidence verify checks one package offline. To pin the signer, pass a partner card with --partner or a kernel key with --trusted-kernel-pubkey; the output then states that signatures verified against pinned keys.

evidence · verifytranscript
$ chio evidence verify --input ./evidence
evidence package verified
tool_receipts:          2
child_receipts:         0
checkpoints:            0
checkpoint_publications: 0
checkpoint_witnesses:   0
checkpoint_consistency_proofs: 0
checkpoint_equivocations: 0
capability_lineage:     2
inclusion_proofs:       0
uncheckpointed_receipts: 2
authorized_receipts:     1
trace_observations:      0
advisory_evaluations:    0
verified_files:         12
child_receipt_scope:    FullQueryWindow
transparency_preview_logs: 0
publication_state:      transparency_preview
exit 0in my-agent

Tampered package

One appended byte in receipts.ndjson moves the file hash the manifest committed to. The verify step exits 1 and names the file, so a script branches on the exit code.

evidence · tampertranscript
$ cp -R evidence evidence-tampered
$ printf '\n' >> evidence-tampered/receipts.ndjson
$ chio evidence verify --input ./evidence-tampered
error[CHIO-ATTEST-PROVENANCE-MISSING]: evidence package file hash mismatch for receipts.ndjson
  help: receipts.ndjson changed after the package was exported; verify the package as exported, or export it again
  code: urn:chio:error:attest:provenance-missing
  docs: https://chio.computer/docs/reference/errors#error-attest-provenance-missing
exit 1in my-agent

Receipt querying

chio receipt list reads the local store and prints one JSON receipt per line. The HTTP routes with the same filters and cursor pagination are on Receipt Query API, and Query audit receipts builds an operational view from them.

FlagTypeDoc
--capability
string
Filter by capability ID.
--tool-server
string
Filter by tool server ID.
--tool-name
string
Filter by tool name.
--outcome
string
Filter by decision outcome: allow, deny, cancelled, incomplete.
--since
u64
Receipts with timestamp >= this Unix seconds value.
--until
u64
Receipts with timestamp <= this Unix seconds value.
--min-cost
u64
Minimum cost in minor currency units, financial receipts only. Requires --cost-currency.
--max-cost
u64
Maximum cost in minor currency units, financial receipts only. Requires --cost-currency.
--cost-currency
string
Currency for cost filters as a three-letter uppercase code.
--limit
usize
Maximum number of receipts per page. Default 50.
--cursor
u64
Cursor for pagination: the seq value to start after.
--tenant
string
Tenant read boundary for the listing. Conflicts with --admin-all.
--admin-all
flag
Read across all tenants as an administrative operation.

The read fails closed when neither --tenant nor --admin-all is supplied, and clap refuses --min-cost or --max-cost without --cost-currency. The first-call example lists its store with a jq projection:

quickstart · receipt-listtranscript
$ chio --receipt-db .chio/receipts.db receipt list --admin-all \
    | jq -r '[.decision.verdict, .tool_server, .tool_name, .id] | @tsv'
allow	hello	hello_world	448440b65fa15559a364d24512cbe4f08631befe2c3d2ab471dad7204b8b69c8
deny	hello	drop_tables	28b6e2576ca2ccbd031e769d8d2bd504317161115a600f27771a7f932307a284
exit 0in my-agent
Select the refused receipt as JSON
quickstart · receipt-jsontranscript
$ chio --receipt-db .chio/receipts.db receipt list --admin-all \
    | jq 'select(.decision.verdict == "deny")'
{
  "id": "28b6e2576ca2ccbd031e769d8d2bd504317161115a600f27771a7f932307a284",
  "timestamp": 1788529912,
  "capability_id": "cap-01a06cb0-aae3-7ad3-8ba7-01350a3e01a0",
  "tool_server": "hello",
  "tool_name": "drop_tables",
  "action": {
    "parameters": {},
    "parameter_hash": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a"
  },
  "decision": {
    "verdict": "deny",
    "reason": "requested tool drop_tables on server hello is not in capability scope",
    "guard": "kernel"
  },
  "receipt_kind": "mediated_decision",
  "boundary_class": "prevent",
  "tool_origin": "caller_executed",
  "redaction_mode": "none",
  "content_hash": "74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b",
  "policy_hash": "69e943b96e9ce64d0264bb56bf8930e77bd4e68adf68fcf1395790dae03e6b55",
  "metadata": {
    "attribution": {
      "delegation_depth": 0,
      "issuer_key": "3dbf7b1230475796d5c78cdcf441c84721d9e3c24362fbbfb4225e307d1b9fb4",
      "subject_key": "af2da8097f2c133affd89145302f029c7a5854e4e3a692a92b0cd20f84d07b37"
    },
    "chio_receipt_signing_nonce": "rcpt-01a06cb0-ab51-70d0-bcb3-72a8b78fe057",
    "receipt_context": {
      "request_id": "check-001"
    }
  },
  "trust_level": "mediated",
  "kernel_key": "3dbf7b1230475796d5c78cdcf441c84721d9e3c24362fbbfb4225e307d1b9fb4",
  "signature": "e89f7a9cbe6c6b207cf5ac0c3e197a3957d62d2994217a7dcaeeeb9869abef1233680328432ee7a502a76238eb6ee9e72b19715e2458a3ef85aebfbed0df9202"
}
exit 0denyin my-agent

chio receipt explain renders one receipt as a triage summary. It takes the receipt id, an optional --input-file holding one receipt or a bilateral co-sign document, --depth (default 8) and --fanout-limit (default 32) for the parent rendering, --inspect-bilateral for a structural trace of a bilateral envelope without signature verification, and the same tenant boundary.

quickstart · receipt-explaintranscript
$ DENY=$(chio --receipt-db .chio/receipts.db receipt list --admin-all \
    | jq -r 'select(.decision.verdict == "deny") | .id')
$ chio --receipt-db .chio/receipts.db receipt explain "$DENY" --admin-all
receipt: 28b6e2576ca2ccbd031e769d8d2bd504317161115a600f27771a7f932307a284
schema: chio.receipt.v1
identity: 28b6e2576ca2ccbd031e769d8d2bd504317161115a600f27771a7f932307a284
decision: deny
reason: requested tool drop_tables on server hello is not in capability scope
guard: kernel
policy_hash: 69e943b96e9ce64d0264bb56bf8930e77bd4e68adf68fcf1395790dae03e6b55
scope_diff: requested scope vs granted scope is not embedded in this receipt
parents: 0
repair_hint: inspect the guard and policy_hash, then mint or narrow a matching capability
exit 0in my-agent

Storage and checkpoints

The local receipt store keeps every signed receipt with a sequence number. chio receipt checkpoint create signs the next batch as a kernel checkpoint with the kernel signing key and a batch bound (--max-batch, default 1024). status and verify report and check the chain, and chio receipt audit runs the claim-log projection validation plus the full chain check.

KernelCheckpointBody, declared deny_unknown_fields, carries schema, checkpoint_seq, batch_start_seq, batch_end_seq, tree_size, merkle_root, issued_at, kernel_key, and the optional previous_checkpoint_sha256 and chain_root (an RFC 6962 root over the checkpoint-chain leaves that consistency proofs verify against). KernelCheckpoint is that body plus an Ed25519 signature over its canonical JSON.

ReceiptInclusionProof names the checkpoint_seq, receipt_seq, leaf_index, merkle_root, and a MerkleProof, and verifies the receipt's canonical bytes against an expected root. Its wire form is inclusion-proof.schema.json: tree_size (at least 1), leaf_index (below tree_size), and audit_path, the ordered sibling hashes from the leaf up to the root, each 32 bytes as lowercase hex with a 0x prefix, with right-edge siblings carried upward without pairing omitted. The evidence package from Evidence export carries the checkpoints and inclusion proofs as NDJSON files beside the receipts.

Receipt lineage

Lineage between receipts lives in a separate signed record, the ReceiptLineageStatement, with schema chio.receipt_lineage_statement.v1; ChioReceipt itself has no lineage field. One statement links one parent receipt to one child receipt, and multi-parent views are derived aggregates over these pairwise statements. The body serializes in camelCase, the signed record adds signature over the canonical JSON of the body, and verify_signature checks the pinned schema before the key.

Wire fieldRust fieldShape
schema
schema
const chio.receipt_lineage_statement.v1
id
id
non-empty string
parentReceiptId
parent_receipt_id
non-empty string
childReceiptId
child_receipt_id
non-empty string
parentRequestId
parent_request_id
RequestId
childRequestId
child_request_id
RequestId
parentSessionAnchor
parent_session_anchor
{ sessionAnchorId, sessionAnchorHash }
childSessionAnchor
child_session_anchor
the same shape
relationKind
relation_kind
local_child, continued, or finding_memory_write_to_delivery
evidenceClass
evidence_class
asserted, observed, or verified; default verified
continuationTokenId
continuation_token_id
optional, omitted when None
issuedAt
issued_at
u64, Unix seconds
kernelKey
kernel_key
PublicKey
signature
signature
Signature over the canonical JSON of the body

finding_memory_write_to_delivery links a governed memory write to the verified finding delivery receipt it depends on. The crate also defines the ordering types a DAG verifier uses: ReceiptHybridLogicalClock (wallSeconds, logical, kernelId; camelCase, deny_unknown_fields), whose advance_from_parent takes the larger wall clock and increments the logical counter on a tie; ReceiptDagParent (receiptId, chainId, dagOrdinal); and parent_set_hash, the SHA-256 of the canonical JSON of the sorted, deduplicated parent receipt ids.

The record that carries chain_id, parent_set_hash, and dag_ordinal is the swarm join receipt, specified on Swarm Protocol.

Child request receipts

Nested flows such as sampling, elicitation, and resource reads under a parent call produce a ChildRequestReceipt. The signature covers the canonical JSON of ChildRequestReceiptBody, the record without algorithm and signature. The child links to its parent through parent_request_id; a lineage statement is a separate record.

FieldTypeShape
id
String
Child request receipt id.
timestamp
u64
Unix seconds.
session_id
SessionId
The session the parent call ran in.
parent_request_id
RequestId
The parent tool call request.
request_id
RequestId
This child request.
operation_kind
OperationKind
snake_case: tool_call, create_message, create_elicitation, list_roots, list_resources, read_resource, list_resource_templates, list_prompts, get_prompt, complete, list_capabilities, heartbeat.
terminal_state
OperationTerminalState
Tagged by state: completed, cancelled with reason, or incomplete with reason.
outcome_hash
String
Hash of the operation outcome.
policy_hash
String
Hash of the policy applied.
metadata
Option<serde_json::Value>
Omitted when None.
kernel_key
PublicKey
The same encodings as on ChioReceipt.
algorithm
Option<SigningAlgorithm>
Absent means Ed25519; omitted when unset or the default.
signature
Signature
Over the canonical JSON of the body.
Source and specification

The format follows spec/PROTOCOL.md in the Chio repository, the sections Receipt Identity And DAG and 6.1 through 6.4, version 1.0, dated 2026-04-14. The specification uses MUST, MUST NOT, and MAY as requirement words. Where the specification and a crate differ, the crate defines the behavior.

The wire form is the record schema spec/schemas/chio-wire/v1/receipt/record.schema.json ($id https://chio-protocol.dev/schemas/chio-wire/v1/receipt/record/v1). The companion schemas in the same directory, as the signed-artifact registry on Schemas and errors lists them:

  • admission-metadata.schema.json (chio.admission-receipt.v1): Chio Durable Admission Receipt Metadata.
  • delivery-contract.schema.json (chio.delivery-contract.v1): Chio Delivery Contract Receipt Metadata.
  • finding-delivery.schema.json (chio.finding.delivery.v1): Chio Finding Delivery Receipt Metadata.
  • inclusion-proof.schema.json: Chio Receipt Merkle Inclusion Proof.
  • lineage_statement.schema.json (chio.receipt_lineage_statement.v1): Chio receipt lineage statement.
  • record.schema.json (chio.receipt.v1): Chio Receipt Record.

Each entry above reads from these files, cited by line:

  • crates/core/chio-core-types/src/receipt/body.rs: the struct, lines 42 to 109; semantic validation, 161 to 177; the id, 182 to 210 and 239 to 244; signing, 289 to 314 (the key check at 292 and 304); verify_signature, 478 to 494; the crypto floor, 496 to 530; is_allowed, 545 to 550; the metadata readers, 581 to 585, 587 to 590, 597 to 603, and 605 to 614.
  • decision.rs: Decision, lines 8 to 31; ToolCallAction, 33 to 40; from_parameters and verify_hash, 42 to 58.
  • kinds.rs: ReceiptKind, lines 40 to 59; BoundaryClass, 61 to 82; ObservationOutcome, 84 to 102; ToolOrigin, 104 to 123; RedactionMode, 125 to 144.
  • metadata.rs: validate_decision, lines 80 to 132, with the cannot_see refusal at 82 to 87; is_authorized, 134 to 140; result_label, 142 to 158; GuardEvidence, 184 to 194; the reserved keys, 196 to 203; DeliveryContract, 243 to 258, with the mismatch commitment at 250 to 255 and validate at 260 to 285; the finding enums, 294 to 322; status_proof, 324 to 347; FindingDelivery, 398 to 432; finding_recovery, 479 to 505; ReceiptAttributionMetadata, 538 to 554.
  • signing.rs: ChioReceiptSigningBody, lines 94 to 104; bind_receipt_signing_nonce, 106 to 141, with original_metadata at 107 and 127 to 135.
  • economics.rs: channel, lines 8 to 50; FinancialReceiptMetadata, 52 to 105, with its invariants at 60 to 75; the budget authority sub-blocks, 108 to 138, and FinancialBudgetAuthorityReceiptMetadata, 140 to 154; SettlementStatus, 156 to 168; the economic envelope types, 170 to 301; EconomicAuthorizationReceiptMetadata, 303 to 330.
  • governance.rs: GovernedTransactionReceiptMetadata, lines 104 to 143, with approval at 18 to 29, runtime assurance at 31 to 49, commerce at 51 to 60, metered billing at 62 to 91, and autonomy at 93 to 102; MonetaryAmount in scope.rs, lines 80 to 91; the call-chain context in capability/governance.rs, 182 to 196 and 579 to 607.
  • crates/core/chio-core-types/src/oracle.rs: the schema constant at line 7 and the struct at 9 to 31; crypto.rs: PublicKey::from_hex, lines 405 to 433, and the signature encodings, 757 to 808; crypto_floor.rs, lines 11 to 23.
  • lineage.rs: ChildRequestReceipt, lines 24 to 43, and its body, 45 to 60 and 120 to 195; the ordering types, 62 to 118; the statement schema constant, 211; evidence_class, 213 to 215; relation_kind, 217 to 226; the camelCase body, 228 to 247; the signature, 319 to 399. crates/core/chio-core-types/src/session/operation.rs: terminal states, lines 14 to 20; operation kinds, 36 to 52.
  • crates/kernel/chio-kernel-core/src/receipts.rs: the content and key checks, lines 74 to 103 and 136 to 146; the signing handle, 105 to 139; the relay path, 226 to 238.
  • crates/kernel/chio-kernel/src/receipt_support/receipt_metadata.rs: the attribution merge, lines 87 to 112; the payee-binding refusals, 250 to 293 and 443 to 478; the economic mode, 357 to 373; the envelope digests, 378 to 383; the rail kind, 401; liability refs, 425; the budget copy, 426 to 435; governed_request_metadata, 480 to 604, with the threshold proposal at 500 to 510 and usage evidence at 530; attribution on allow and deny, 655 to 667.
  • Kernel: the admission terminal in crates/kernel/chio-kernel/src/kernel/admission_coordinator/terminal.rs, lines 2049 to 2063, 2093 to 2103, and 2115 to 2125; the allow merge in crates/kernel/chio-kernel/src/kernel/responses/allow_responses.rs, 84 to 93; the budget metadata in crates/kernel/chio-kernel/src/kernel/validation.rs, 909 to 925 and 927 to 1048; crates/kernel/chio-kernel/src/admission_operation.rs, lines 29 to 30, and its projection.rs, 52 to 71; crates/kernel/chio-kernel/src/checkpoint.rs: KernelCheckpointBody, 98 to 137, KernelCheckpoint, 140 to 148, and ReceiptInclusionProof, 150 to 173; the swarm join receipt in crates/kernel/chio-swarm-authority/src/types.rs, 184 to 200.
  • Schemas: the record schema's semantic conditions, lines 178 to 266, the cannot_see rule at 74, the key and signature patterns at 151 and 170, parameter_hash at 327 to 331, and Decision at 334 to 406; admission-metadata.schema.json, required fields at lines 7 to 24, states at 32 to 53, dispatch states at 54 to 63, compensation at 74 to 80, store_fence at 109 to 118, the retained commit at 119 to 152; delivery-contract.schema.json, 7 to 22; finding-delivery.schema.json, 7 to 54, with the status proof at 73 to 94; inclusion-proof.schema.json, 8 to 29; lineage_statement.schema.json, line 5, with the session anchor at 81 to 95.
  • spec/PROTOCOL.md: trace and advisory records as evidence, lines 1022 to 1024; cancelled and incomplete verdicts, 1027 to 1035; child request receipts, 1060 to 1072; reserved metadata keys, 1074 to 1092, with original_metadata at 1085; admission_operation, 1099 to 1106; delivery_contract, 1108 to 1119; finding_delivery, 1121 to 1132; economic_authorization, 1133 to 1141; runtime assurance, 1165 to 1167; call-chain provenance, 1169 to 1175.
  • sdks/typescript/chio-ts/src/invariants/receipt.ts: unsupported algorithms, lines 5 to 20; ReceiptVerification, 65 to 78; parsing, 80 to 138; verifyReceipt, 201 to 232; verifyReceiptJson, 241 to 243.
  • crates/products/chio-cli/src/cli/types/receipt.rs: receipt list, lines 5 to 47, with the cost-currency rule at 25 to 30 and the tenant rule at 40 to 46; checkpoints, 56 to 67; receipt explain, 78 to 122; audit and the checkpoint commands, 139 to 158; evidence export and verify, 160 to 200.

Next: verify a receipt outside the kernel