{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "endpoint": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "pattern": "^https://"
    },
    "method": {
      "enum": [
        "GET",
        "HEAD",
        "OPTIONS"
      ]
    },
    "path": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024,
      "pattern": "^/[A-Za-z0-9_./~%-]*$"
    },
    "query": {
      "type": "array",
      "maxItems": 16,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48,
            "pattern": "^[A-Za-z][A-Za-z0-9_-]*$"
          },
          "value": {
            "type": "string",
            "minLength": 0,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9 ._~:/?#\\[\\]@!$&'()*+,;=%-]*$",
            "description": "Literal query data, encoded once with URLSearchParams; do not pre-encode. URL-looking values must pass the public HTTPS, no-credentials and no-fragment runtime guard. Nested URL query values are checked to a maximum depth of 4, without fetching or DNS-resolving them."
          }
        },
        "required": [
          "name",
          "value"
        ]
      }
    },
    "bodyShape": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "const": "none"
        }
      },
      "required": [
        "type"
      ]
    },
    "expected": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "network": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80,
          "pattern": "^eip155:[1-9][0-9]{0,15}$"
        },
        "asset": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "amount": {
          "type": "string",
          "minLength": 1,
          "maxLength": 78,
          "pattern": "^(0|[1-9][0-9]*)$"
        },
        "displayPrice": {
          "type": "string",
          "minLength": 1,
          "maxLength": 86,
          "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,6})?$"
        },
        "payTo": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        }
      },
      "required": []
    }
  },
  "required": [
    "endpoint",
    "method",
    "path",
    "bodyShape"
  ]
}
