{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://xcim.invalid/ietf/an01/schemas/intent.schema.json",
  "title": "AN01-F01 intent",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "adapter_profile",
    "anchor_policy_id",
    "issuer_id",
    "log_id",
    "as_genesis_commitment",
    "chain_id",
    "network_genesis_block_hash",
    "identity_commitment",
    "contract_model",
    "abi_sha256",
    "creation_code_template_keccak256",
    "build_recipe",
    "initial_publisher",
    "guardian",
    "finality_policy_id"
  ],
  "properties": {
    "adapter_profile": {
      "const": "xcim-as01-evm-amoy-milestone-01"
    },
    "anchor_policy_id": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/id"
    },
    "issuer_id": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/id"
    },
    "log_id": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/id"
    },
    "as_genesis_commitment": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/hash"
    },
    "chain_id": {
      "const": 80002
    },
    "network_genesis_block_hash": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/hex32"
    },
    "identity_commitment": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/hash"
    },
    "contract_model": {
      "const": "immutable-single-log"
    },
    "abi_sha256": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/hex32"
    },
    "creation_code_template_keccak256": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/hex32"
    },
    "build_recipe": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "compiler",
        "evm_version",
        "optimizer_enabled",
        "optimizer_runs",
        "via_ir",
        "metadata_bytecode_hash",
        "metadata_append_cbor",
        "source_sha256",
        "compiler_input_sha256"
      ],
      "properties": {
        "compiler": {
          "const": "0.8.30+commit.73712a01.Emscripten.clang"
        },
        "evm_version": {
          "const": "paris"
        },
        "optimizer_enabled": {
          "const": true
        },
        "optimizer_runs": {
          "const": 200
        },
        "via_ir": {
          "const": false
        },
        "metadata_bytecode_hash": {
          "const": "none"
        },
        "metadata_append_cbor": {
          "const": false
        },
        "source_sha256": {
          "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/hex32"
        },
        "compiler_input_sha256": {
          "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/hex32"
        }
      }
    },
    "initial_publisher": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/address"
    },
    "guardian": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/address"
    },
    "finality_policy_id": {
      "const": "amoy-milestone-receiver-node-01"
    }
  }
}
