{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/immix/json-schema/immix-submit-chain-policy-body-schema.json",
  "title": "SubmitChainPolicyBody",
  "description": "SubmitChainPolicy with route-sourced fields (chainPolicyId) not required in the body — the route injects them; a body restatement must agree, and edge-stamped fields (userId) removed — the edge sets them and refuses a body value.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/immix-chain-policies-api-openapi.yml#/components/schemas/SubmitChainPolicyBody",
  "type": "object",
  "properties": {
    "chainPolicyId": {
      "type": "integer",
      "description": "0 = create."
    },
    "expectedVersion": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+$",
      "description": "int64 as a decimal JSON string"
    },
    "assetId": {
      "type": "integer"
    },
    "chain": {
      "$ref": "#/$defs/SubmitChainPolicyBodyChain",
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict"
    },
    "isEnabled": {
      "type": "boolean",
      "description": "a boolean; absent reads false"
    },
    "minConfirmations": {
      "type": [
        "integer",
        "null"
      ]
    },
    "minTransferAmount": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
      "maxLength": 64,
      "description": "money (a Decimal on the wire): a decimal string on input, encoded at its own scale — the fractional digits sent, trailing zeros dropped, at most 18. The edge consults no reference data: a value finer than its record is the platform's to judge, not the edge's to refuse; absent, null or \"0\" = unset (the 0 sentinel)"
    },
    "maxTransferAmount": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
      "maxLength": 64,
      "description": "money (a Decimal on the wire): a decimal string on input, encoded at its own scale — the fractional digits sent, trailing zeros dropped, at most 18. The edge consults no reference data: a value finer than its record is the platform's to judge, not the edge's to refuse; absent, null or \"0\" = unset (the 0 sentinel)"
    },
    "settlementSlaNs": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+$",
      "description": "int64 as a decimal JSON string"
    }
  },
  "required": [
    "assetId",
    "chain"
  ],
  "$defs": {
    "SubmitChainPolicyBodyChain": {
      "type": "string",
      "enum": [
        "UNKNOWN",
        "BITCOIN",
        "ETHEREUM"
      ],
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict",
      "title": "SubmitChainPolicyBodyChain"
    }
  }
}