{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://alxprotocol.com/protocol/1/schemas/block.schema.json",
  "title": "ALX Block",
  "description": "The ALX Protocol primitive — binds artifact content and parent lineage into a single deterministic blockHash.",
  "$comment": "This schema validates structural shape only. It does not verify contentHash, blockHash derivation, parent hash ordering, graph completeness, graph acyclicity, signature validity, or trace relational correctness.",
  "type": "object",
  "properties": {
    "blockHash": {
      "$ref": "./defs.schema.json#/$defs/hash",
      "description": "Deterministic Block identity — keccak256(UTF8(\"ALX-BLOCK-V1\\u0000\") || canonicalize({ content, parentHashes })). Any change to content or parentHashes produces a different blockHash."
    },
    "contentHash": {
      "$ref": "./defs.schema.json#/$defs/hash",
      "description": "keccak256(UTF8(\"ALX-CONTENT-V1\\u0000\") || canonicalize(content)) — content-only identity"
    },
    "parentHashes": {
      "$ref": "./defs.schema.json#/$defs/parentHashes",
      "description": "Declared upstream Block identities, bound into blockHash. Must be sorted and deduplicated."
    },
    "content": {
      "description": "Opaque JSON-serializable artifact payload. The protocol does not inspect or interpret content."
    },
    "protocolVersion": {
      "type": "string",
      "const": "1",
      "description": "Required protocol algorithm version. Excluded from Block hash derivation."
    }
  },
  "required": [
    "blockHash",
    "contentHash",
    "parentHashes",
    "content",
    "protocolVersion"
  ],
  "additionalProperties": false
}
