{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hashdit/json-schema/hashdit-token-approval-security-request-schema.json",
  "title": "TokenApprovalSecurityRequest",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hashdit-openapi.json#/components/schemas/TokenApprovalSecurityRequest",
  "type": "object",
  "required": [
    "chain_id"
  ],
  "properties": {
    "chain_id": {
      "type": "string",
      "description": "`int` or `string`. Only `1` (Ethereum), `56` (BSC), or `728126428` / `\"tron\"` (TRON). Any other chain is rejected with `400`. See [Supported Chains](/api-reference/supported-chains)."
    },
    "owner": {
      "type": "string",
      "description": "Owner / approver address. At least one of `owner` or `spender` is required."
    },
    "spender": {
      "type": "string",
      "description": "Spender address. At least one of `owner` or `spender` is required."
    },
    "token": {
      "type": "string",
      "description": "Restrict to one token contract. Cannot be sent on its own — `token` alone returns `400`."
    },
    "page": {
      "type": "integer",
      "default": 1,
      "description": "1-based page number. Values below 1 are treated as 1."
    },
    "limit": {
      "type": "integer",
      "default": 50,
      "description": "Rows per page. Ceiling `100` — higher values are clamped, not rejected."
    },
    "filter": {
      "type": "string",
      "description": "Only `\"only-valid\"` is accepted; it drops rows whose `valid_allowance` is `0`. Any other value is a validation error."
    },
    "include_balance": {
      "type": "boolean",
      "default": false,
      "description": "Read each token's live on-chain balance for the owner."
    },
    "include_spender_risk": {
      "type": "boolean",
      "default": false,
      "description": "Add `spender_risk` to every row."
    },
    "include_token_risk": {
      "type": "boolean",
      "default": false,
      "description": "Add `token_risk` to every row."
    },
    "include_owner_risk": {
      "type": "boolean",
      "default": false,
      "description": "Add `owner_risk` to every row."
    },
    "include_address_types": {
      "type": "boolean",
      "default": false,
      "description": "Classify each spender and owner as `\"eoa\"` or `\"contract\"`."
    }
  }
}