{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:intertween:experimental:integrity:0.1:cross-node-attestation",
  "title": "CrossNodeAttestation",
  "description": "Experimental 0.1 structure only. No assertion of signature, authority, privacy or federation conformance. See README.md.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "witness",
    "checkpoint_hash",
    "claim",
    "created_at",
    "signature"
  ],
  "properties": {
    "witness": {
      "type": "string",
      "format": "uri",
      "minLength": 1
    },
    "checkpoint_hash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "claim": {
      "enum": [
        "checkpoint-retained",
        "signature-verified",
        "sequence-consistency-verified"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "signature": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "algorithm",
        "key_id",
        "value"
      ],
      "properties": {
        "algorithm": {
          "const": "ECDSA-P256-SHA256"
        },
        "key_id": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]+={0,2}$"
        }
      }
    }
  }
}
