{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swopme-co/json-schema/swopme-co-environment-chain-rpc-config-schema.json",
  "title": "EnvironmentChainRpcConfig",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/swopme-co-openapi.json#/components/schemas/EnvironmentChainRpcConfig",
  "type": "object",
  "required": [
    "environmentId",
    "chain",
    "network",
    "rpcUrl",
    "wsUrl",
    "headers",
    "commitment",
    "skipPreflight",
    "maxRetries",
    "enabled",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "environmentId": {
      "type": "string"
    },
    "chain": {
      "$ref": "#/$defs/Chain"
    },
    "network": {
      "type": "string"
    },
    "rpcUrl": {
      "type": "string",
      "format": "uri"
    },
    "wsUrl": {
      "anyOf": [
        {
          "type": "string",
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "headers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EnvironmentChainRpcHeader"
      }
    },
    "commitment": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "processed",
            "confirmed",
            "finalized"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "skipPreflight": {
      "type": "boolean"
    },
    "maxRetries": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0
        },
        {
          "type": "null"
        }
      ]
    },
    "enabled": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "Chain": {
      "type": "string",
      "enum": [
        "evm",
        "solana"
      ]
    },
    "EnvironmentChainRpcHeader": {
      "type": "object",
      "required": [
        "name",
        "value"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "value": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4000
        }
      }
    }
  }
}