{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://a2a-schema.ai/receipt-v1.schema.json",
 "title": "RCO receipt version 1 (RCO-10060 v1.0 §5)",
 "type": "object",
 "required": [
  "v",
  "id",
  "seq",
  "writer",
  "caller",
  "subject",
  "subject_type",
  "market",
  "rule_version",
  "cleared_at",
  "answer_hash",
  "prev_hash",
  "hash",
  "sig",
  "kid"
 ],
 "properties": {
  "v": {
   "type": "string",
   "description": "Receipt specification version"
  },
  "id": {
   "type": "string",
   "description": "Content-derived identifier of the receipt, carrying the rco: prefix"
  },
  "seq": {
   "type": "integer",
   "description": "Position of the receipt in the chain"
  },
  "writer": {
   "type": "string",
   "description": "The authorised gate that cleared the read, under the published writer mapping"
  },
  "caller": {
   "type": "string",
   "description": "Defined caller attribution: a hash of the firm's key identifier or the payer's wallet handle; empty when unknown"
  },
  "subject": {
   "type": "string",
   "description": "What was read, by its own identifier"
  },
  "subject_type": {
   "type": "string",
   "description": "Kind of identifier in subject"
  },
  "market": {
   "type": "string",
   "description": "Market the read was cleared under"
  },
  "rule_version": {
   "type": "string",
   "description": "Clearance rule and its revision, as owned by ACM-68000"
  },
  "cleared_at": {
   "type": "string",
   "description": "Stated time the read was cleared"
  },
  "answer_hash": {
   "type": "string",
   "description": "Hash of the exact signed answer supplied"
  },
  "prev_hash": {
   "type": "string",
   "description": "Hash of the preceding receipt; the defined genesis value for the first"
  },
  "hash": {
   "type": "string",
   "description": "Hash of the receipt's canonical payload"
  },
  "sig": {
   "type": "string",
   "description": "Ed25519 signature selected through kid"
  },
  "kid": {
   "type": "string",
   "description": "Key identifier selecting the receipt key in the door's key set"
  }
 }
}
