{
  "$defs": {
    "AnchorReceiptState": {
      "description": "State represented by an immutable adapter receipt.",
      "enum": [
        "submitted",
        "confirmed"
      ],
      "type": "string"
    }
  },
  "$id": "urn:mars:schema:v1:anchor-receipt-record",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "One immutable observation returned by an anchor adapter.",
  "properties": {
    "blockHeight": {
      "description": "Optional finalized ledger height.",
      "format": "uint64",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "observedAt": {
      "description": "Time the adapter observed this state.",
      "format": "date-time",
      "type": "string"
    },
    "proof": {
      "description": "Optional provider-neutral proof document."
    },
    "receiptKey": {
      "description": "Adapter-defined idempotency key for this observation.",
      "type": "string"
    },
    "state": {
      "$ref": "#/$defs/AnchorReceiptState",
      "description": "Submitted or confirmed state represented by this receipt."
    },
    "transactionId": {
      "description": "Provider-neutral external transaction or operation identifier.",
      "type": "string"
    }
  },
  "required": [
    "receiptKey",
    "transactionId",
    "state",
    "observedAt"
  ],
  "title": "AnchorReceiptRecord",
  "type": "object"
}
