{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://eips.ethereum.org/assets/eip-8506/schemas/method.schema.json",
  "title": "AITO Method",
  "description": "A typed method of measurement, calibration, conversion or combination. Registering a method grants no right to issue and discharges no obligation.",
  "type": "object",
  "required": [
    "aito",
    "kind",
    "methodType",
    "inputs",
    "outputs",
    "applicability",
    "limitations"
  ],
  "properties": {
    "aito": {
      "const": "1",
      "description": "Record format version."
    },
    "kind": {
      "const": "method"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "supersedes": {
      "$ref": "#/$defs/bytes32",
      "description": "Identifier of the record this one replaces."
    },
    "methodType": {
      "enum": [
        "unit-conversion",
        "conditional-calibration",
        "measurement-procedure",
        "combination"
      ]
    },
    "basisSide": {
      "enum": [
        "output",
        "input",
        "mixed"
      ],
      "description": "Required for conditional-calibration."
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "outputs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "applicability": {
      "type": "string"
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "May be empty, but must be present."
    }
  },
  "additionalProperties": true,
  "$defs": {
    "bytes32": {
      "type": "string",
      "pattern": "^0x[0-9a-f]{64}$"
    },
    "account": {
      "type": "string",
      "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}:[-.%a-zA-Z0-9]{1,128}$",
      "description": "CAIP-10 account identifier."
    },
    "decimal": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$",
      "description": "A non-negative decimal written as a string. Records carry no floating-point numbers."
    },
    "integer": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)$"
    },
    "time": {
      "type": "string",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
    },
    "undeclared": {
      "const": "undeclared"
    }
  }
}
