{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://coulomb.social/schemas/railiance/custody-projection-receipt.v1.json",
  "title": "Railiance active custody projection receipt v1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "interface", "version", "workplan_id", "state", "receipt_id", "lease_id",
    "engagement_id", "target", "projection_contract_digest", "broker_receipt_digest",
    "projected_at", "expires_at", "identities", "resources", "cleanup_authority",
    "secret_values_observed"
  ],
  "properties": {
    "interface": {"const": "railiance.custody-projection-receipt"},
    "version": {"const": 1},
    "workplan_id": {"const": "RAILIANCE-WP-0025"},
    "state": {"const": "projected"},
    "receipt_id": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
    "lease_id": {"type": "string", "pattern": "^custody:[0-9a-f]{32}$"},
    "engagement_id": {"type": "string"},
    "target": {"type": "object"},
    "projection_contract_digest": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
    "broker_receipt_digest": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
    "projected_at": {"type": "string", "format": "date-time"},
    "expires_at": {"type": "string", "format": "date-time"},
    "identities": {"type": "array", "minItems": 2, "maxItems": 2},
    "resources": {"type": "object"},
    "cleanup_authority": {"const": "railiance-platform"},
    "secret_values_observed": {"const": false}
  }
}
