{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asteroidxrpl-com/json-schema/asteroidxrpl-com-escrow-state-schema.json",
  "title": "ASTEROID treasury escrow schedule",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asteroidxrpl-com-openapi.json#/components/schemas/escrow-state",
  "type": "object",
  "required": [
    "account",
    "accountRoleClaimStatus",
    "entries",
    "count",
    "totalEscrowed",
    "nextUnlock",
    "lastUnlock",
    "methodology"
  ],
  "additionalProperties": false,
  "properties": {
    "account": {
      "type": "string"
    },
    "accountRoleClaimStatus": {
      "type": "string",
      "enum": [
        "ledger-verified",
        "owner-confirmed",
        "independently-sourced",
        "derived",
        "aspirational",
        "unresolved"
      ]
    },
    "entries": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "index",
          "amount",
          "destination",
          "destinationIsTreasury",
          "finishAfter",
          "cancelAfter",
          "sequence",
          "state"
        ],
        "additionalProperties": false,
        "properties": {
          "index": {
            "type": "string"
          },
          "amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
            "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
          },
          "destination": {
            "type": "string"
          },
          "destinationIsTreasury": {
            "type": "boolean"
          },
          "finishAfter": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "cancelAfter": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "sequence": {
            "type": "integer"
          },
          "state": {
            "type": "string",
            "enum": [
              "locked",
              "releasable",
              "expired",
              "unknown"
            ]
          }
        }
      }
    },
    "count": {
      "type": "integer",
      "minimum": 0
    },
    "totalEscrowed": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
      "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
    },
    "nextUnlock": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "lastUnlock": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "methodology": {
      "type": "string"
    }
  }
}