{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blockvectra/json-schema/blockvectra-subscription-create-schema.json",
  "title": "SubscriptionCreate",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/push.yaml#/components/schemas/SubscriptionCreate",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "url",
    "chains"
  ],
  "properties": {
    "url": {
      "$ref": "#/$defs/Url"
    },
    "addresses": {
      "type": "array",
      "minItems": 1,
      "maxItems": 10000,
      "items": {
        "$ref": "#/$defs/AddressInput"
      },
      "description": "Optional initial addresses; the complete creation body must fit in 64 KiB. Added atomically with the subscription."
    },
    "chains": {
      "type": "object",
      "minProperties": 1,
      "propertyNames": {
        "$ref": "#/$defs/ChainName"
      },
      "additionalProperties": {
        "$ref": "#/$defs/ChainSettings"
      }
    }
  },
  "$defs": {
    "AddressInput": {
      "type": "string",
      "pattern": "^0x[0-9a-fA-F]{40}$",
      "description": "Lower case",
      "or mixed case that passes the EIP-55 checksum.": null
    },
    "ChainName": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9]*(_[a-z0-9]+)+$",
      "description": "lower(chain_slug), ES-030 rule 10."
    },
    "ChainSettings": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "confirmations": {
          "type": "integer",
          "minimum": 1,
          "description": "N for this chain, from min_confirmations to max_confirmations; omitted means default_confirmations."
        }
      }
    },
    "Url": {
      "type": "string",
      "maxLength": 2048,
      "pattern": "^https://",
      "description": "https, port 443, a host name (no IP literal), no userinfo or fragment; stored and returned normalized."
    }
  }
}