{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://xcim.org/schemas/wd-02/profiles/amoy-pilot-0.1/anchor-genesis.schema.json",
  "title": "XCIM Experimental Amoy Anchor Genesis",
  "description": "Downloaded genesis is not a trust root. All pins require independent receiver policy.",
  "type": "object", "additionalProperties": false,
  "required": ["xcim_version", "object_type", "profile", "network", "issuer_id", "issuer_uri", "contract", "anchor_signer", "deployment_transaction", "deployment_block", "deployment_block_hash", "creation_code_sha256_hex", "runtime_code_sha256", "receipt_key", "batch_key", "trust_model"],
  "properties": {
    "xcim_version": { "const": "0.1" },
    "object_type": { "const": "anchor_genesis" },
    "profile": { "const": "xcim-evm-amoy-pilot-0.1" },
    "network": { "const": "eip155:80002" },
    "issuer_id": { "type": "string", "pattern": "^urn:xcim:issuer:[A-Za-z0-9._~:-]+$" },
    "issuer_uri": { "$ref": "https://xcim.org/schemas/wd-02/0.2/identity-evidence.schema.json#/$defs/httpsUri" },
    "contract": { "$ref": "#/$defs/address" },
    "anchor_signer": { "$ref": "#/$defs/address" },
    "deployment_transaction": { "$ref": "https://xcim.org/schemas/0.1/chain-anchor.schema.json#/$defs/hex32" },
    "deployment_block": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
    "deployment_block_hash": { "$ref": "https://xcim.org/schemas/0.1/chain-anchor.schema.json#/$defs/hex32" },
    "creation_code_sha256_hex": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
    "runtime_code_sha256": { "$ref": "https://xcim.org/schemas/wd-02/0.2/identity-evidence.schema.json#/$defs/hash" },
    "receipt_key": { "$ref": "#/$defs/key" },
    "batch_key": { "$ref": "#/$defs/key" },
    "trust_model": { "const": "explicit_receiver_pins_no_accreditation_assertion" }
  },
  "$defs": {
    "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" },
    "key": {
      "type": "object", "additionalProperties": false, "required": ["kty", "crv", "kid", "x"],
      "properties": {
        "kty": { "const": "OKP" }, "crv": { "const": "Ed25519" },
        "kid": { "type": "string", "minLength": 1, "maxLength": 200 },
        "x": { "$ref": "https://xcim.org/schemas/wd-02/0.2/identity-evidence.schema.json#/$defs/hash" }
      }
    }
  }
}
