{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "Artifact": {
      "properties": {
        "bytes": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      },
      "type": "object",
      "required": [
        "bytes",
        "type"
      ],
      "description": "Artifact is exact retained content with a selected interpretation: the hash of the bytes and the hash of the interpretation descriptor the bytes are read under (order 0002 D4)."
    },
    "EntryRef": {
      "properties": {
        "root_id": {
          "type": "string"
        },
        "space_id": {
          "type": "string"
        },
        "position": {
          "type": "integer"
        }
      },
      "type": "object",
      "required": [
        "root_id",
        "space_id",
        "position"
      ],
      "description": "EntryRef is the occurrence identity of one entry: a position in one journal."
    },
    "Grant": {
      "properties": {
        "principal": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        },
        "path": {
          "$ref": "#/$defs/Path"
        },
        "valid_until": {
          "type": "string"
        },
        "issuer": {
          "type": "string"
        },
        "signature": {
          "type": "string",
          "description": "base64 of the 64 Ed25519 signature bytes over the fact"
        }
      },
      "type": "object",
      "required": [
        "principal",
        "kind",
        "path",
        "valid_until",
        "issuer",
        "signature"
      ],
      "description": "Grant is what a principal carries to prove it may act: a kind on a subtree until an instant, issued by another principal (the root or a delegate)."
    },
    "Path": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "description": "Path is a location in the world: labels from a root organizer down, relative to the world."
    },
    "Proof": {
      "properties": {
        "principal": {
          "type": "string"
        },
        "nonce": {
          "type": "string"
        },
        "timestamp": {
          "type": "string"
        },
        "audience": {
          "type": "string"
        },
        "signature": {
          "type": "string",
          "description": "base64 of the 64 Ed25519 signature bytes"
        }
      },
      "type": "object",
      "required": [
        "principal",
        "nonce",
        "timestamp",
        "audience",
        "signature"
      ],
      "description": "Proof authenticates one request attempt: the principal, a fresh nonce, the instant, the audience the proof is meant for, and the signature over the signing record."
    }
  },
  "properties": {
    "policy": {
      "type": "string"
    },
    "content": {
      "$ref": "#/$defs/Artifact"
    },
    "evidence": {
      "items": {
        "$ref": "#/$defs/EntryRef"
      },
      "type": "array"
    },
    "grants": {
      "items": {
        "$ref": "#/$defs/Grant"
      },
      "type": "array"
    },
    "proof": {
      "$ref": "#/$defs/Proof"
    }
  },
  "type": "object",
  "required": [
    "policy",
    "content",
    "evidence",
    "grants",
    "proof"
  ],
  "title": "DeclarationFrame",
  "description": "DeclarationFrame is what the act was made against, retained in Bytes as canonical JSON and named by digest in the admission: the artifact's content reference, the cited evidence occurrences, the grants and proof relied on, and Dawn's admission-policy version."
}
