{
  "openapi": "3.0.0",
  "paths": {
    "/v1/public/assets": {
      "get": {
        "description": "Возвращает список активных валют, которые обменник может использовать для депозитов и выплат. Только публичные поля (код, тикер, сеть, стандарт токена, decimals, флаги deposit/payout, адрес контракта, минимальные суммы).",
        "operationId": "AssetsPublicController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicAssetResponseDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "List supported currencies",
        "tags": [
          "public · assets"
        ]
      }
    },
    "/v1/public/networks": {
      "get": {
        "description": "Возвращает список включённых сетей с метаданными: код, название, архетип, нативный тикер, флаг enabled, число подтверждений по умолчанию.",
        "operationId": "NetworksPublicController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicNetworkResponseDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "List supported networks",
        "tags": [
          "public · networks"
        ]
      }
    },
    "/v1/public/aml/currencies": {
      "get": {
        "description": "Валюты, которые можно передать в POST /v1/public/aml/checks (allowlist подключённого AML-провайдера). Пустой список = провайдер ещё не синхронизировал валюты (скрин всё равно возможен, но неподдерживаемое вернётся как skipped).",
        "operationId": "AmlPublicController_currencies",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAmlCurrenciesResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Список валют, доступных для AML-скрина",
        "tags": [
          "public · aml"
        ]
      }
    },
    "/v1/public/aml/checks": {
      "post": {
        "description": "Скринит адрес (по умолчанию) или транзакцию через подключённого AML-провайдера и возвращает риск-скор/уровень. Результат может быть `pending` — тогда опрашивайте GET /v1/public/aml/checks/{uuid}. Идемпотентно по X-Idempotency-Key (повтор не тратит лишнюю квоту провайдера).",
        "operationId": "AmlPublicController_screen",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePublicAmlCheckDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Проверка создана (pending или готовый результат).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAmlCheckResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Запустить AML-скрин адреса или транзакции",
        "tags": [
          "public · aml"
        ]
      }
    },
    "/v1/public/aml/checks/{uuid}": {
      "get": {
        "description": "Опрашивает результат по uuid. Если ещё pending — дёргает провайдера и реконсилит статус.",
        "operationId": "AmlPublicController_get",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAmlCheckResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Получить результат AML-проверки",
        "tags": [
          "public · aml"
        ]
      }
    },
    "/v1/public/webhooks/test": {
      "post": {
        "description": "Ставит в очередь один (без ретраев) подписанный тестовый webhook на настроенный для сайта callback_url. Заголовки и подпись — как у боевых webhook'ов (X-Signature = HMAC-SHA256 по телу). Проверьте, что ваш endpoint принял его и валидировал подпись.",
        "operationId": "WebhooksPublicController_test",
        "parameters": [],
        "responses": {
          "201": {
            "description": "Тестовый webhook поставлен в очередь."
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Отправить тестовый webhook на ваш callback_url",
        "tags": [
          "public · webhooks"
        ]
      }
    },
    "/v1/public/webhooks/resend/{eventId}": {
      "post": {
        "description": "Ставит в очередь повторную доставку ранее сгенерированного webhook'а (по его X-Event-Id). Тело и URL берутся из лога доставки; подпись пересчитывается. Скоупится по вашему сайту.",
        "operationId": "WebhooksPublicController_resend",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "description": "X-Event-Id из заголовка webhook'а.",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Переотправка поставлена в очередь."
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Переотправить webhook по X-Event-Id",
        "tags": [
          "public · webhooks"
        ]
      }
    },
    "/v1/public/webhooks/egress-ips": {
      "get": {
        "description": "Добавьте эти адреса в allow-list вашего сервера: с них приходят webhook-запросы. Список задаёт оператор платформы.",
        "operationId": "WebhooksPublicController_egressIps",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Исходящие IP-адреса платформы для вебхуков",
        "tags": [
          "public · webhooks"
        ]
      }
    },
    "/v1/public/webhooks/events": {
      "get": {
        "description": "Все возможные типы событий с описанием и признаком финальности; `subscribed` — какие включены для вашего сайта (настраивает оператор в панели).",
        "operationId": "WebhooksPublicController_events",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Каталог webhook-событий и текущая подписка сайта",
        "tags": [
          "public · webhooks"
        ]
      }
    },
    "/v1/public/deposits": {
      "post": {
        "description": "Создаёт депозит и возвращает адрес (+ memo для memo-based сетей) для оплаты. Идемпотентно по (site, order_id, asset) и опц. X-Idempotency-Key.",
        "operationId": "DepositPublicController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePublicDepositDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Депозит создан (или возвращён существующий).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDepositResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Create new deposit request",
        "tags": [
          "public · deposits"
        ]
      },
      "get": {
        "description": "История депозитов сайта. Пагинация page/perPage, опц. фильтр ?status=paid или ?status=paid,paid_over. 1.4.0: keyset-пагинация — передайте `cursor` из meta.nextCursor (первый запрос: `cursor=` пустой).",
        "operationId": "DepositPublicController_list",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Номер страницы (с 1).",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number"
            }
          },
          {
            "name": "perPage",
            "required": false,
            "in": "query",
            "description": "Размер страницы (макс 100).",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "Фильтр по статусу (одно значение или несколько через запятую). Напр. \"paid\" или \"paid,paid_over\".",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "1.4.0: курсор из `meta.nextCursor` предыдущего ответа. При наличии `page` игнорируется — выдача идёт keyset-методом (стабильна при появлении новых записей). Первую страницу по курсору запрашивайте без параметра — `meta.nextCursor` появится в ответе.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDepositListResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "List deposits (paginated, scoped to caller siteId)",
        "tags": [
          "public · deposits"
        ]
      }
    },
    "/v1/public/deposits/{uuid}/refresh": {
      "post": {
        "description": "1.4.0: принудительная перепроверка адреса депозита в сети — когда клиент говорит «я оплатил», а tx ещё не замечена. Просроченный депозит (expired) с найденной входящей tx оживляется. Не чаще раза в 30 с на депозит (429 RATE_LIMITED). Возвращает актуальное состояние депозита.",
        "operationId": "DepositPublicController_refresh",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDepositResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Refresh deposit (force on-chain recheck)",
        "tags": [
          "public · deposits"
        ]
      }
    },
    "/v1/public/deposits/{uuid}": {
      "get": {
        "description": "Возвращает депозит + on-chain данные incoming-tx (object `transaction`, null если tx ещё нет).",
        "operationId": "DepositPublicController_getByUuid",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "description": "UUID депозита из ответа на создание.",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDepositResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Get deposit by uuid (scoped to caller siteId)",
        "tags": [
          "public · deposits"
        ]
      }
    },
    "/v1/public/deposits/{uuid}/aml": {
      "get": {
        "description": "AML-скрин source-of-funds (адрес отправителя входящей tx) по депозиту. amlStatus=not_checked если AML выключен / tx ещё не замечена / сеть не поддерживается провайдером.",
        "operationId": "DepositPublicController_getAmlByUuid",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "description": "UUID депозита из ответа на создание.",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDepositAmlResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Get AML data for deposit by uuid",
        "tags": [
          "public · deposits"
        ]
      }
    },
    "/v1/public/deposits/by-order-id/{orderId}": {
      "get": {
        "description": "Поиск по вашему order_id (label). Возвращает депозит + on-chain данные incoming-tx.",
        "operationId": "DepositPublicController_getByOrderId",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "description": "Ваш order_id, переданный при создании.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDepositResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Get deposit by your order_id",
        "tags": [
          "public · deposits"
        ]
      }
    },
    "/v1/public/deposits/by-order-id/{orderId}/aml": {
      "get": {
        "description": "AML-скрин source-of-funds депозита по вашему order_id (label).",
        "operationId": "DepositPublicController_getAmlByOrderId",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "description": "Ваш order_id, переданный при создании.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDepositAmlResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Get AML data for deposit by your order_id",
        "tags": [
          "public · deposits"
        ]
      }
    },
    "/v1/public/static-addresses": {
      "post": {
        "description": "Постоянный адрес пополнения для клиента/аккаунта: каждая входящая транзакция создаёт отдельный депозит (со своими статусами, вебхуками `deposit.*` с полем `staticAddress` и свипом). Идемпотентно по `orderId`: повтор возвращает тот же адрес. Для memo-based сетей (TON/XRP) — общий адрес + постоянный memo.",
        "operationId": "StaticAddressesPublicController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStaticAddressDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StaticAddressResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Create static (reusable) deposit address (1.4.0)",
        "tags": [
          "public · static addresses"
        ]
      },
      "get": {
        "operationId": "StaticAddressesPublicController_list",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Номер страницы (с 1).",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number"
            }
          },
          {
            "name": "perPage",
            "required": false,
            "in": "query",
            "description": "Размер страницы (макс 100).",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "Фильтр по статусу (одно значение или несколько через запятую). Напр. \"paid\" или \"paid,paid_over\".",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "1.4.0: курсор из `meta.nextCursor` предыдущего ответа. При наличии `page` игнорируется — выдача идёт keyset-методом (стабильна при появлении новых записей). Первую страницу по курсору запрашивайте без параметра — `meta.nextCursor` появится в ответе.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StaticAddressListResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "List static addresses of your site",
        "tags": [
          "public · static addresses"
        ]
      }
    },
    "/v1/public/static-addresses/by-order-id/{orderId}": {
      "get": {
        "operationId": "StaticAddressesPublicController_getByOrderId",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StaticAddressResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Get static address by your orderId",
        "tags": [
          "public · static addresses"
        ]
      }
    },
    "/v1/public/static-addresses/{uuid}": {
      "get": {
        "operationId": "StaticAddressesPublicController_get",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StaticAddressResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Get static address",
        "tags": [
          "public · static addresses"
        ]
      }
    },
    "/v1/public/static-addresses/{uuid}/payments": {
      "get": {
        "description": "Каждый платёж — обычный объект депозита (как GET /v1/public/deposits/{uuid}); page/perPage, status, cursor.",
        "operationId": "StaticAddressesPublicController_payments",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Номер страницы (с 1).",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number"
            }
          },
          {
            "name": "perPage",
            "required": false,
            "in": "query",
            "description": "Размер страницы (макс 100).",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "Фильтр по статусу (одно значение или несколько через запятую). Напр. \"paid\" или \"paid,paid_over\".",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "1.4.0: курсор из `meta.nextCursor` предыдущего ответа. При наличии `page` игнорируется — выдача идёт keyset-методом (стабильна при появлении новых записей). Первую страницу по курсору запрашивайте без параметра — `meta.nextCursor` появится в ответе.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDepositListResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "List payments (child deposits) of a static address",
        "tags": [
          "public · static addresses"
        ]
      }
    },
    "/v1/public/static-addresses/{uuid}/disable": {
      "post": {
        "description": "Адрес больше не мониторится; уже замеченные платежи дойдут до конца. Обратимо (enable).",
        "operationId": "StaticAddressesPublicController_disable",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StaticAddressResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Stop accepting payments on a static address",
        "tags": [
          "public · static addresses"
        ]
      }
    },
    "/v1/public/static-addresses/{uuid}/enable": {
      "post": {
        "operationId": "StaticAddressesPublicController_enable",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StaticAddressResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Resume accepting payments on a static address",
        "tags": [
          "public · static addresses"
        ]
      }
    },
    "/v1/public/invoices": {
      "post": {
        "description": "Создаёт счёт для вызывающего сайта и возвращает ссылку оплаты (payPath / payUrl + token). При оплате вебхуки депозита уйдут на callback_url сайта (или на `urlCallback` счёта) с вашим order_id. 1.4.0: `urlReturn` (кнопка «вернуться»), `urlSuccess` (авто-редирект после оплаты с ?order_id&invoice&status), `urlCallback`, `theme` (light|dark|auto), `locale` (ru|en).",
        "operationId": "InvoicePublicController_createPublic",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePublicInvoiceDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicInvoiceCreatedDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Create invoice (payment link) — for exchanger CMS",
        "tags": [
          "public · invoices"
        ]
      },
      "get": {
        "description": "Счета сайта, новые сверху. Пагинация page/perPage. `status` — фильтр по состоянию (pending,paid,…).",
        "operationId": "InvoicePublicController_list",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Номер страницы (с 1).",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number"
            }
          },
          {
            "name": "perPage",
            "required": false,
            "in": "query",
            "description": "Размер страницы (макс 100).",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "Фильтр по статусу (одно значение или несколько через запятую). Напр. \"paid\" или \"paid,paid_over\".",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "1.4.0: курсор из `meta.nextCursor` предыдущего ответа. При наличии `page` игнорируется — выдача идёт keyset-методом (стабильна при появлении новых записей). Первую страницу по курсору запрашивайте без параметра — `meta.nextCursor` появится в ответе.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicInvoiceListResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "List invoices of your site (1.4.0)",
        "tags": [
          "public · invoices"
        ]
      }
    },
    "/v1/public/invoices/by-order-id/{orderId}": {
      "get": {
        "operationId": "InvoicePublicController_getByOrderId",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicInvoiceCreatedDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Get invoice by your order_id (1.4.0)",
        "tags": [
          "public · invoices"
        ]
      }
    },
    "/v1/public/invoices/{uuid}/disable": {
      "post": {
        "description": "Отключает публичную ссылку счёта (страница → 410). Депозит продолжает мониториться до expiresAt: если клиент уже отправил средства, оплата всё равно будет учтена и вебхук придёт.",
        "operationId": "InvoicePublicController_disable",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicInvoiceCreatedDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Disable invoice payment link (1.4.0)",
        "tags": [
          "public · invoices"
        ]
      }
    },
    "/v1/public/invoices/{token}": {
      "get": {
        "description": "Данные платёжной страницы: адрес, актив, сумма, срок (отсчёт), статус оплаты, бренд, редиректы, тема/язык. 410 Gone если ссылка отключена (прошёл срок + 1 день).",
        "operationId": "InvoicePublicController_getByToken",
        "parameters": [
          {
            "name": "token",
            "required": true,
            "in": "path",
            "description": "Публичный токен из ссылки счёта.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePublicResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get invoice payment page by public token",
        "tags": [
          "public · invoices"
        ]
      }
    },
    "/v1/public/invoices/{token}/status": {
      "get": {
        "description": "Лёгкий статус для live-обновления страницы (поллинг каждые ~3с). 410 если ссылка отключена.",
        "operationId": "InvoicePublicController_getStatus",
        "parameters": [
          {
            "name": "token",
            "required": true,
            "in": "path",
            "description": "Публичный токен из ссылки счёта.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePublicStatusDto"
                }
              }
            }
          }
        },
        "summary": "Poll invoice payment status",
        "tags": [
          "public · invoices"
        ]
      }
    },
    "/v1/public/payouts": {
      "post": {
        "description": "Создаёт выплату на указанный адрес. Идемпотентно по (site, order_id) и опц. X-Idempotency-Key. Может потребовать ручного одобрения (requiresApproval=true).",
        "operationId": "PayoutPublicController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePublicPayoutDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Выплата создана (или возвращена существующая).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPayoutResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Create payout request",
        "tags": [
          "public · payouts"
        ]
      },
      "get": {
        "description": "История выплат сайта. Пагинация page/perPage, опц. фильтр ?status=confirmed или ?status=queued,broadcasted. 1.4.0: keyset-пагинация — передайте `cursor` из meta.nextCursor (первый запрос: `cursor=` пустой).",
        "operationId": "PayoutPublicController_list",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Номер страницы (с 1).",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number"
            }
          },
          {
            "name": "perPage",
            "required": false,
            "in": "query",
            "description": "Размер страницы (макс 100).",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "Фильтр по статусу (одно значение или несколько через запятую). Напр. \"paid\" или \"paid,paid_over\".",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "1.4.0: курсор из `meta.nextCursor` предыдущего ответа. При наличии `page` игнорируется — выдача идёт keyset-методом (стабильна при появлении новых записей). Первую страницу по курсору запрашивайте без параметра — `meta.nextCursor` появится в ответе.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPayoutListResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "List payouts (paginated, scoped to caller siteId)",
        "tags": [
          "public · payouts"
        ]
      }
    },
    "/v1/public/payouts/bulk": {
      "post": {
        "description": "Массовое создание выплат — до 100 строк за запрос. Каждая строка обрабатывается НЕЗАВИСИМО: ошибка одной не отменяет остальные (результат построчно в `items`). Идемпотентность — по orderId каждой строки (X-Idempotency-Key на весь пакет не применяется). Требует scope deposit_and_payout.",
        "operationId": "PayoutPublicController_createBulk",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkCreatePublicPayoutsDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBulkPayoutsResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Create payouts in bulk (1.4.0)",
        "tags": [
          "public · payouts"
        ]
      }
    },
    "/v1/public/payouts/calculate": {
      "post": {
        "description": "Раскладка выплаты ДО создания: комиссия обменника, сетевая комиссия по приоритету, сколько получит адресат, сколько спишется, USD-оценки, проверки (минимум, лимиты сайта, достаточность hot-баланса). Ничего не создаёт и не резервирует.",
        "operationId": "PayoutPublicController_calculate",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayoutCalculateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPayoutCalculationDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Calculate payout breakdown (1.4.0, без создания)",
        "tags": [
          "public · payouts"
        ]
      }
    },
    "/v1/public/payouts/fee-estimate": {
      "post": {
        "operationId": "PayoutPublicController_estimateFee",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayoutFeeEstimateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPayoutFeeEstimateResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Estimate network fee for payout (без создания)",
        "tags": [
          "public · payouts"
        ]
      }
    },
    "/v1/public/payouts/{uuid}": {
      "get": {
        "description": "Возвращает выплату + on-chain данные исходящей tx (txHash, confirmations, explorerTxUrl, timestamps).",
        "operationId": "PayoutPublicController_getByUuid",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "description": "UUID выплаты из ответа на создание.",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPayoutResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Get payout by uuid (scoped to caller siteId)",
        "tags": [
          "public · payouts"
        ]
      }
    },
    "/v1/public/payouts/by-order-id/{orderId}": {
      "get": {
        "description": "Поиск по вашему order_id (label). Возвращает выплату + on-chain данные исходящей tx.",
        "operationId": "PayoutPublicController_getByOrderId",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "description": "Ваш order_id, переданный при создании.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPayoutResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Get payout by your order_id",
        "tags": [
          "public · payouts"
        ]
      }
    },
    "/v1/public/deposits/{uuid}/refund": {
      "post": {
        "description": "Создаёт выплату-возврат (`source=refund`) на адрес отправителя входящей транзакции (или на `toAddress`). Депозит переходит в `refund_process`; по исходу выплаты — `refund_paid` (webhook `deposit.refunded`) или `refund_fail` (`deposit.refund_failed`). Разрешено из статусов paid / paid_over / wrong_amount / refund_fail. По настройке платформы выплата-возврат ждёт одобрения оператора (`pending_approval`). Повторный вызов при живой выплате-возврате → 409 REFUND_IN_PROGRESS. Требует scope deposit_and_payout.",
        "operationId": "DepositRefundPublicController_create",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDepositRefundDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepositRefundResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Refund deposit to sender (1.4.0)",
        "tags": [
          "public · deposits"
        ]
      }
    },
    "/v1/public/balances": {
      "get": {
        "description": "Агрегированные средства hot-кошельков по каждому активу. `available` = on-chain баланс минус выплаты, принятые, но ещё не отправленные (reserved) — то, чем можно оплатить новую выплату. `pendingOutgoing` — отправлено и ждёт подтверждений; `pendingIncoming` — депозиты с замеченной tx до финализации. USD — по курсу на момент ответа. Поля `available`/`updatedAt` совместимы с 1.3.x.",
        "operationId": "BalancesPublicController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicBalanceRowDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Балансы по активам: total / reserved / available / pending + USD",
        "tags": [
          "public · balances"
        ]
      }
    },
    "/v1/public/fees": {
      "get": {
        "description": "По каждому активному активу: процент комиссии обменника (депозит/выплата), оценка сетевой комиссии выплаты economy/recommended/high в нативной монете сети с USD-эквивалентом, минимумы, требуемые подтверждения. Кэшируется 60 с (`ttlSeconds`). Ошибка оценки сети не роняет ответ — `networkFee.error`.",
        "operationId": "FeesPublicController_list",
        "parameters": [
          {
            "name": "assetCode",
            "required": false,
            "in": "query",
            "description": "Только один актив.",
            "schema": {
              "example": "USDT_TRC20",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ items[], updatedAt, ttlSeconds }"
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Прайс-лист: комиссия обменника + сетевые комиссии по приоритетам (1.4.0)",
        "tags": [
          "public · fees"
        ]
      }
    },
    "/v1/public/limits": {
      "get": {
        "description": "Rate-limit запросов, максимум строк bulk-выплат, границы `lifetime` депозита и дефолтные окна по сетям, минимумы по активам, лимиты выплат (per-request / daily / weekly / velocity) с текущим использованием окон.",
        "operationId": "LimitsPublicController_get",
        "parameters": [],
        "responses": {
          "200": {
            "description": "{ rateLimit, bulk, deposit, assets[] }"
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Действующие ограничения для вашего сайта (1.4.0)",
        "tags": [
          "public · limits"
        ]
      }
    },
    "/v1/public/transactions/queue": {
      "get": {
        "description": "Депозиты в ожидании оплаты/подтверждений и выплаты до confirmed — одним списком, новые сверху. Keyset-пагинация: передавайте `cursor` из `nextCursor` (без пропусков и дублей при появлении новых записей). `kind` — только депозиты / только выплаты / всё.",
        "operationId": "TransactionsPublicController_list",
        "parameters": [
          {
            "name": "kind",
            "required": false,
            "in": "query",
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "all",
                "deposit",
                "payout"
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 200,
              "default": 50,
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Курсор из `nextCursor` предыдущего ответа.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicQueueResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Очередь незавершённых операций сайта (1.4.0)",
        "tags": [
          "public · transactions"
        ]
      }
    },
    "/v1/public/sandbox/deposits/{uuid}/pay": {
      "post": {
        "description": "Эмулирует входящую транзакцию на адрес депозита: депозит проходит штатный путь process → finalize → sweep (без сети), вебхуки deposit.* приходят настоящие с полем `sandbox: true`. Сумма по умолчанию — ожидаемая; больше/меньше — paid_over / wrong_amount (и доплата, если включена). `confirmations` меньше порога — депозит остаётся в process, финализация придёт через ~30 с. Работает и для статических адресов (каждый вызов — отдельный платёж). Только для сайта с включённой песочницей (403 SANDBOX_ONLY).",
        "operationId": "SandboxPublicController_pay",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxPayDepositDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxPayDepositResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Simulate an incoming transaction (sandbox site only, 1.4.0)",
        "tags": [
          "public · sandbox"
        ]
      }
    },
    "/v1/public/sandbox/payouts/{uuid}/complete": {
      "post": {
        "description": "Задаёт исход выплаты песочницы: `confirmed` (queued → signing → broadcasted → confirmed, синтетический txhash) или `failed`. Вебхуки payout.confirmed / payout.failed приходят настоящие. Выплата должна быть в `queued` (pending_approval — сначала одобрить в админке; лимиты и одобрение работают и в песочнице).",
        "operationId": "SandboxPublicController_complete",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxCompletePayoutDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxCompletePayoutResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Simulate a payout outcome (sandbox site only, 1.4.0)",
        "tags": [
          "public · sandbox"
        ]
      }
    },
    "/v1/public/conversions/quote": {
      "post": {
        "description": "Возвращает ожидаемый выход, minReceived, курс и slippage для пары source→target. Не создаёт заявку. `executable=false` = провайдер отдал preview-курс без on-chain исполнения (не настроен DEX-backend).",
        "operationId": "ConversionPublicController_quote",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuotePublicConversionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicQuoteResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Живая котировка конвертации (preview)",
        "tags": [
          "public · conversions"
        ]
      }
    },
    "/v1/public/conversions": {
      "post": {
        "description": "Создаёт заявку на своп накопленного актива в стейбл. Исполняется асинхронно — опрашивайте GET /v1/public/conversions/{uuid}. Идемпотентно по X-Idempotency-Key.",
        "operationId": "ConversionPublicController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePublicConversionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicConversionResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Создать конвертацию",
        "tags": [
          "public · conversions"
        ]
      }
    },
    "/v1/public/conversions/{uuid}": {
      "get": {
        "operationId": "ConversionPublicController_get",
        "parameters": [
          {
            "name": "uuid",
            "required": true,
            "in": "path",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicConversionResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "hmac": []
          }
        ],
        "summary": "Статус конвертации",
        "tags": [
          "public · conversions"
        ]
      }
    }
  },
  "info": {
    "title": "Wallet Platform — Public API",
    "description": "API для интеграции CMS обменника: создание депозитов и выплат, отслеживание статусов, справочники активов и сетей.\n\n## Аутентификация\nКаждый запрос подписывается HMAC-SHA256. Обязательные заголовки:\n- `X-Api-Id` — публичный идентификатор ключа (выдаётся в админке).\n- `X-Api-Key` — публичный ключ.\n- `X-Timestamp` — Unix-секунды; сервер принимает ±300 сек от своего времени.\n- `X-Signature` — `HMAC_SHA256_Hex( X-Timestamp + \".\" + raw_body, api_secret )`. Для GET тело пустое.\n- `X-Idempotency-Key` — опционально (UUID). Гарантирует, что повторный POST не создаст дубликат.\n\nДополнительно: IP-вызывающего должен быть в whitelist сайта (настраивается в админке). Секрет (`api_secret`) показывается один раз при создании ключа и хранится только у вас.\n\n## Формат ответа\nВсе ответы — единый envelope: `{ \"ok\": true, \"data\": ... }` при успехе либо `{ \"ok\": false, \"error\": { \"code\": \"...\", \"message\": \"...\" } }` при ошибке.\n\n## Идемпотентность\nСоздание депозита/выплаты идемпотентно по вашему `order_id` (уникален в рамках сайта и актива) и/или по `X-Idempotency-Key`. Повторный вызов с тем же ключом вернёт исходный объект, а не создаст новый.\n\n## Webhooks (исходящие)\nПри смене статуса платформа шлёт POST на ваш `callback_url`. Заголовки: `X-Event-Type`, `X-Event-Id` (uuid, идемпотентность на вашей стороне), `X-Timestamp`, `X-Signature` = `HMAC_SHA256_Hex(raw_body, callback_secret)`. Проверяйте подпись перед обработкой.\nСобытия: `deposit.tx_detected`, `deposit.finalized`, `deposit.failed`, `deposit.refunded`, `payout.broadcasted`, `payout.confirmed`, `payout.failed`.\nДоставка считается успешной при HTTP 2xx за 10 секунд. Ретраи: 30s, 2m, 10m, 1h, 6h, 24h (до 8 попыток).",
    "version": "1",
    "contact": {}
  },
  "tags": [],
  "servers": [],
  "components": {
    "securitySchemes": {
      "X-Api-Id": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Id",
        "description": "Публичный идентификатор API-ключа"
      },
      "X-Api-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Публичный API-ключ"
      },
      "hmac": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Signature",
        "description": "HMAC-SHA256-Hex(timestamp + \".\" + raw_body, api_secret)"
      },
      "X-Timestamp": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Timestamp",
        "description": "Unix-секунды, ±300с"
      }
    },
    "schemas": {
      "SetSecretDto": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "provider",
              "rent_market",
              "telegram",
              "system_wallet",
              "gas_payer",
              "webhook",
              "misc"
            ]
          },
          "key": {
            "type": "string",
            "example": "tron.master_mnemonic"
          },
          "plaintext": {
            "type": "string",
            "description": "Plaintext — encrypted via keystore on save"
          }
        },
        "required": [
          "scope",
          "key",
          "plaintext"
        ]
      },
      "RotateApiKeyDto": {
        "type": "object",
        "properties": {
          "newApiKey": {
            "type": "string",
            "description": "Новый API key (получи у провайдера через их dashboard)."
          }
        },
        "required": [
          "newApiKey"
        ]
      },
      "StartRotationDto": {
        "type": "object",
        "properties": {
          "toVersion": {
            "type": "string",
            "description": "Target key version (например v2)",
            "example": "v2"
          }
        },
        "required": [
          "toVersion"
        ]
      },
      "SubscribeDto": {
        "type": "object",
        "properties": {}
      },
      "UnsubscribeDto": {
        "type": "object",
        "properties": {}
      },
      "CreateSystemWalletDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "network": {
            "type": "string",
            "enum": [
              "TRON",
              "TON",
              "ETHEREUM",
              "BSC",
              "POLYGON",
              "AVALANCHE",
              "BITCOIN",
              "LITECOIN",
              "DOGECOIN",
              "XRP",
              "SOLANA",
              "ZCASH",
              "MONERO",
              "COSMOS",
              "POLKADOT"
            ]
          },
          "walletRole": {
            "type": "string",
            "enum": [
              "hot",
              "admin",
              "energy",
              "cold",
              "payout"
            ]
          },
          "address": {
            "type": "string"
          },
          "privateKeyHex": {
            "type": "string",
            "description": "Hex без 0x. Если задан — wallet может подписывать tx. Иначе watch-only."
          },
          "mnemonic": {
            "type": "string",
            "description": "BIP-39 recovery phrase (12/24 слова через пробел). Альтернатива private key. Если задана — privateKey деривируется из (mnemonic, derivationIndex) и проверяется совпадение с `address`. Хранится зашифрованной и доступна через reveal-secrets."
          },
          "derivationIndex": {
            "type": "number",
            "description": "Индекс BIP-44 деривации (default 0). Используется только если задан mnemonic.",
            "example": 0
          },
          "publicKey": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "comment": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "network",
          "walletRole",
          "address"
        ]
      },
      "UpdateSystemWalletDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disabled",
              "archived"
            ]
          },
          "isDefault": {
            "type": "boolean"
          },
          "comment": {
            "type": "string"
          },
          "walletRole": {
            "type": "string",
            "enum": [
              "hot",
              "admin"
            ]
          }
        }
      },
      "SweepToAdminDto": {
        "type": "object",
        "properties": {
          "assetCode": {
            "type": "string",
            "description": "Code актива (например USDT_TRC20)"
          },
          "amount": {
            "type": "string",
            "description": "Сумма в desired units (decimal string). Если пусто — весь balance."
          }
        },
        "required": [
          "assetCode"
        ]
      },
      "UpdateAssetDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disabled",
              "deprecated"
            ]
          },
          "depositEnabled": {
            "type": "boolean"
          },
          "payoutEnabled": {
            "type": "boolean"
          },
          "minDepositAmount": {
            "type": "string",
            "example": "1.5"
          },
          "minPayoutAmount": {
            "type": "string",
            "example": "1.0"
          },
          "minConfirmations": {
            "type": "number",
            "example": 19
          },
          "displayName": {
            "type": "string"
          }
        }
      },
      "PublicAssetResponseDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "USDT_TRC20",
            "description": "Код актива (используйте в assetCode при создании deposit/payout)."
          },
          "symbol": {
            "type": "string",
            "example": "USDT",
            "description": "Тикер."
          },
          "displayName": {
            "type": "string",
            "example": "Tether USD (TRC-20)",
            "description": "Человекочитаемое название."
          },
          "network": {
            "type": "string",
            "example": "TRON",
            "description": "Сеть актива."
          },
          "tokenStandard": {
            "type": "string",
            "nullable": true,
            "example": "TRC20",
            "description": "Стандарт токена (TRC20 / ERC20 / BEP20 / JETTON). null для нативной монеты."
          },
          "decimals": {
            "type": "number",
            "example": 6,
            "description": "Число десятичных знаков."
          },
          "depositEnabled": {
            "type": "boolean",
            "example": true,
            "description": "Доступны ли депозиты в этом активе."
          },
          "payoutEnabled": {
            "type": "boolean",
            "example": true,
            "description": "Доступны ли выплаты в этом активе."
          },
          "contractAddress": {
            "type": "string",
            "nullable": true,
            "example": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
            "description": "Адрес контракта токена (публичная on-chain информация). null для нативной монеты."
          },
          "minDeposit": {
            "type": "string",
            "example": "1",
            "description": "Минимальная сумма депозита (string)."
          },
          "minPayout": {
            "type": "string",
            "example": "1",
            "description": "Минимальная сумма выплаты (string)."
          }
        },
        "required": [
          "code",
          "symbol",
          "displayName",
          "network",
          "tokenStandard",
          "decimals",
          "depositEnabled",
          "payoutEnabled",
          "contractAddress",
          "minDeposit",
          "minPayout"
        ]
      },
      "PublicNetworkResponseDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "TRON",
            "description": "Код сети."
          },
          "displayName": {
            "type": "string",
            "example": "TRON",
            "description": "Человекочитаемое название сети."
          },
          "archetype": {
            "type": "string",
            "example": "account_based",
            "description": "Архетип: account_based / utxo / memo_based."
          },
          "nativeSymbol": {
            "type": "string",
            "example": "TRX",
            "description": "Тикер нативной монеты сети."
          },
          "enabled": {
            "type": "boolean",
            "example": true,
            "description": "Включена ли сеть (доступна для операций)."
          },
          "defaultConfirmations": {
            "type": "number",
            "example": 19,
            "description": "Число подтверждений по умолчанию для финализации."
          }
        },
        "required": [
          "code",
          "displayName",
          "archetype",
          "nativeSymbol",
          "enabled",
          "defaultConfirmations"
        ]
      },
      "CreateCredentialDto": {
        "type": "object",
        "properties": {
          "expiresAt": {
            "format": "date-time",
            "type": "string",
            "description": "Опциональная дата истечения. По умолчанию credential бессрочный."
          },
          "scope": {
            "type": "string",
            "enum": [
              "deposit_only",
              "deposit_and_payout",
              "read_only"
            ],
            "description": "Область действия ключа. deposit_only — только создание депозитов (выплаты запрещены: украденный ключ не выведет средства). read_only (1.4.0) — только чтение (GET): для мониторинга/дашбордов. По умолчанию deposit_and_payout (полный доступ)."
          },
          "label": {
            "type": "string",
            "example": "CMS prod",
            "description": "1.4.0: метка ключа (до 64 символов)."
          },
          "ipAllowList": {
            "example": [
              "203.0.113.42",
              "198.51.100.0/24"
            ],
            "description": "1.4.0: per-key IP allow-list (IP или CIDR, до 32). Запрос обязан пройти И whitelist сайта, И этот список. Пусто — ограничение только whitelist сайта.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UpdateCredentialDto": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "nullable": true,
            "description": "Метка (null — убрать)."
          },
          "ipAllowList": {
            "description": "Полная замена per-key IP allow-list ([] — снять ограничение).",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Срок действия (null — бессрочно)."
          }
        }
      },
      "AddIpWhitelistDto": {
        "type": "object",
        "properties": {
          "ip": {
            "type": "string",
            "example": "203.0.113.42",
            "description": "IP или CIDR"
          },
          "comment": {
            "type": "string",
            "example": "Office static IP"
          }
        },
        "required": [
          "ip"
        ]
      },
      "CreateSiteDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "My Exchange"
          },
          "domain": {
            "type": "string",
            "example": "exchanger.example.com"
          },
          "callbackUrl": {
            "type": "string",
            "example": "https://exchanger.example.com/wallet/callback"
          },
          "customConfirmations": {
            "type": "number",
            "example": 19,
            "description": "Override default network confirmations"
          },
          "allowDuplicateOrderId": {
            "type": "boolean",
            "example": false,
            "description": "Политика повторного orderId. false (по умолчанию) — строгая защита: повтор orderId при создании депозита/выплаты возвращает 409 DUPLICATE_ORDER_ID (защита от случайной двойной операции). true — мягкий режим: повтор идемпотентно возвращает существующую операцию."
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateSiteDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "archived"
            ]
          },
          "callbackUrl": {
            "type": "string"
          },
          "customConfirmations": {
            "type": "number"
          },
          "allowDuplicateOrderId": {
            "type": "boolean",
            "description": "Политика повторного orderId. false (по умолчанию) — строгая защита (повтор → 409 DUPLICATE_ORDER_ID). true — мягкий режим (повтор возвращает существующую операцию)."
          },
          "rateLimitPerMin": {
            "type": "object",
            "description": "Per-site лимит Public API (запросов/мин). null — использовать глобальный дефолт (api.rate_limit_per_min_default). 0 — без лимита для этого сайта.",
            "nullable": true,
            "minimum": 0,
            "maximum": 100000
          },
          "brandDisplayName": {
            "type": "string",
            "nullable": true,
            "maxLength": 120,
            "description": "Название на странице оплаты."
          },
          "brandPrimaryColor": {
            "type": "string",
            "nullable": true,
            "example": "#3b82f6",
            "description": "Акцентный цвет (HEX #rrggbb)."
          },
          "brandLogoUrl": {
            "type": "string",
            "nullable": true,
            "description": "URL логотипа (https, PNG/SVG)."
          },
          "brandSupportUrl": {
            "type": "string",
            "nullable": true,
            "description": "Ссылка «Поддержка» в подвале страницы оплаты."
          },
          "brandDefaultLocale": {
            "type": "string",
            "enum": [
              "ru",
              "en"
            ],
            "nullable": true,
            "description": "Язык страницы оплаты по умолчанию."
          },
          "brandDefaultTheme": {
            "type": "string",
            "enum": [
              "light",
              "dark",
              "auto"
            ],
            "nullable": true,
            "description": "Тема страницы оплаты по умолчанию."
          },
          "underpaymentTolerancePercent": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 100,
            "description": "Допуск недоплаты по умолчанию (%), null — глобальная настройка."
          },
          "allowTopUpDefault": {
            "type": "boolean",
            "description": "Режим доплаты по умолчанию для депозитов сайта (allowTopUp, если не передан в запросе)."
          },
          "webhookFormat": {
            "type": "string",
            "enum": [
              "native",
              "heleket"
            ],
            "description": "1.4.0: формат исходящих вебхуков: native (v2, HMAC-заголовки) | heleket (тело в формате Heleket с полем sign = md5 — drop-in для готовых модулей CMS)."
          },
          "sandbox": {
            "type": "boolean",
            "description": "1.4.0: песочница — депозиты и выплаты сайта не выходят в сеть; входящие транзакции и исходы выплат эмулируются через POST /v1/public/sandbox/*, вебхуки приходят настоящие (с полем sandbox: true)."
          },
          "webhookEvents": {
            "description": "Подписка на webhook-события (коды каталога GET /v1/admin/callbacks/catalog). Пустой массив — дефолтный набор каталога (совместим с v1: tx_detected, finalized, failed, refunded, payout.*).",
            "example": [
              "deposit.tx_detected",
              "deposit.confirmation",
              "deposit.finalized",
              "payout.confirmed"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateRouteDto": {
        "type": "object",
        "properties": {
          "siteUuid": {
            "type": "string",
            "description": "UUID сайта; null = глобальный дефолт"
          },
          "network": {
            "type": "object"
          },
          "assetCode": {
            "type": "string",
            "description": "Code актива, например USDT_TRC20"
          },
          "destinationWalletUuid": {
            "type": "string",
            "description": "UUID system_wallet куда сметать"
          },
          "minAmountForSweep": {
            "type": "string",
            "description": "Decimal string. По умолчанию 0 (без порога)."
          },
          "autoSweepEnabled": {
            "type": "boolean",
            "description": "Auto-sweep on/off. По умолчанию true."
          },
          "confirmationsRequired": {
            "type": "number",
            "description": "Сколько подтверждений ждать. По умолчанию 1."
          }
        },
        "required": [
          "network",
          "assetCode",
          "destinationWalletUuid"
        ]
      },
      "UpdateRouteDto": {
        "type": "object",
        "properties": {
          "minAmountForSweep": {
            "type": "string"
          },
          "autoSweepEnabled": {
            "type": "boolean"
          },
          "confirmationsRequired": {
            "type": "number"
          },
          "destinationWalletUuid": {
            "type": "string"
          },
          "confirm": {
            "type": "boolean",
            "description": "Защита от случайного изменения destination. Если destination меняется и `confirm` ≠ true — PATCH возвращает HTTP 200 с preview (`{ preview: true, before, after, warnings }`) и НЕ применяет изменения. UI должен показать AlertDialog с diff'ом и повторить PATCH с confirm=true для применения."
          }
        }
      },
      "CreateAmlProviderDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "getblock",
            "description": "Machine-код (должен быть известен registry)"
          },
          "name": {
            "type": "string",
            "example": "GetBlock AML"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "isDefault": {
            "type": "boolean",
            "default": false
          },
          "baseUrl": {
            "type": "string",
            "example": "https://api.getblock.net/rpc/v1/request"
          },
          "configJson": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "code",
          "name"
        ]
      },
      "UpdateAmlProviderDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "GetBlock AML"
          },
          "enabled": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "baseUrl": {
            "type": "object",
            "example": "https://api.getblock.net/rpc/v1/request",
            "nullable": true
          },
          "configJson": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "SetAmlApiKeyDto": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string",
            "description": "Plaintext API key — шифруется keystore и кладётся в secrets_vault"
          }
        },
        "required": [
          "apiKey"
        ]
      },
      "UpdateAmlSettingsDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Глобальный вкл/выкл AML-скрининга"
          },
          "blockThreshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "Порог блокировки (0–100)"
          },
          "warnThreshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "Порог флага (0–100)"
          },
          "provider": {
            "type": "string",
            "example": "getblock",
            "description": "Код активного провайдера"
          },
          "directionDeposit": {
            "type": "boolean",
            "description": "Скринить ли входящие депозиты"
          },
          "blockAction": {
            "type": "string",
            "enum": [
              "hold",
              "quarantine"
            ],
            "description": "Что делать с заблокированными (high-risk) депозитами: hold (держать на адресе) | quarantine (увести на отдельный кошелёк)."
          },
          "flagAction": {
            "type": "string",
            "enum": [
              "pass",
              "hold",
              "quarantine"
            ],
            "description": "Что делать с помеченными (medium-risk) депозитами: pass (пропустить) | hold (держать) | quarantine (увести на отдельный кошелёк)."
          },
          "quarantineWalletUuid": {
            "type": "string",
            "description": "UUID системного кошелька для карантина рисковых средств (пустая строка = не выбран)."
          }
        }
      },
      "UpsertAmlAssetPolicyDto": {
        "type": "object",
        "properties": {
          "providerCode": {
            "type": "object",
            "example": "getblock",
            "nullable": true,
            "description": "Код AML-провайдера. null/\"\" = снять привязку (валюта не проверяется)."
          },
          "enabled": {
            "type": "boolean",
            "default": true,
            "description": "Включена ли AML-проверка для валюты."
          },
          "checkMethod": {
            "type": "string",
            "enum": [
              "address",
              "transaction",
              "both"
            ],
            "default": "transaction",
            "description": "Что проверять."
          },
          "blockThreshold": {
            "type": "object",
            "minimum": 0,
            "maximum": 100,
            "nullable": true,
            "description": "Порог блокировки 0–100 (null = глобальный compliance.aml_block_threshold)."
          },
          "warnThreshold": {
            "type": "object",
            "minimum": 0,
            "maximum": 100,
            "nullable": true,
            "description": "Порог флага 0–100 (null = глобальный compliance.aml_warn_threshold)."
          },
          "blockAction": {
            "type": "string",
            "enum": [
              "hold",
              "quarantine"
            ],
            "nullable": true,
            "description": "Действие при block (null = глобальное)."
          },
          "flagAction": {
            "type": "string",
            "enum": [
              "pass",
              "hold",
              "quarantine"
            ],
            "nullable": true,
            "description": "Действие при flag (null = глобальное)."
          },
          "quarantineWalletUuid": {
            "type": "object",
            "nullable": true,
            "description": "UUID карантин-кошелька для этой валюты (null = глобальный)."
          },
          "note": {
            "type": "object",
            "nullable": true,
            "description": "Заметка оператора."
          }
        }
      },
      "OverrideAmlCheckDto": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "released",
              "frozen"
            ],
            "description": "released = разблокировать, frozen = заморозить"
          },
          "reason": {
            "type": "string",
            "example": "Manual review: legitimate exchange withdrawal",
            "minLength": 3
          }
        },
        "required": [
          "action",
          "reason"
        ]
      },
      "RecheckAmlDto": {
        "type": "object",
        "properties": {
          "network": {
            "type": "string",
            "example": "TRON",
            "description": "Сеть (NetworkCode)."
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "address": {
            "type": "string",
            "example": "TXYZ...abcd",
            "description": "Проверяемый адрес (для депозита — отправитель)."
          },
          "txHash": {
            "type": "string",
            "example": "a1b2...e9f0",
            "description": "Хеш транзакции (если проверяем tx)."
          },
          "contractAddress": {
            "type": "string",
            "description": "Контракт токена (для резолва token_id у провайдера)."
          },
          "resourceType": {
            "type": "string",
            "example": "deposit_transaction"
          },
          "resourceUuid": {
            "type": "string",
            "format": "uuid",
            "description": "UUID ресурса (deposit_transaction) — решение применится к нему."
          }
        },
        "required": [
          "network",
          "assetCode",
          "address"
        ]
      },
      "CreateGroupDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Скам-проекты",
            "description": "Имя группы."
          }
        },
        "required": [
          "name"
        ]
      },
      "RenameGroupDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Новое имя",
            "description": "Новое имя группы."
          }
        },
        "required": [
          "name"
        ]
      },
      "ToggleGroupCheckDto": {
        "type": "object",
        "properties": {
          "checkEnabled": {
            "type": "boolean",
            "example": true,
            "description": "Включить (true) или выключить (false) проверку по группе."
          }
        },
        "required": [
          "checkEnabled"
        ]
      },
      "MoveAddressesDto": {
        "type": "object",
        "properties": {
          "addressUuids": {
            "description": "UUID адресов для переноса.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "targetGroupUuid": {
            "type": "string",
            "description": "UUID целевой группы (не OFAC/readonly)."
          }
        },
        "required": [
          "addressUuids",
          "targetGroupUuid"
        ]
      },
      "CreateBlacklistDto": {
        "type": "object",
        "properties": {
          "network": {
            "type": "string",
            "enum": [
              "TRON",
              "TON",
              "ETHEREUM",
              "BSC",
              "POLYGON",
              "AVALANCHE",
              "BITCOIN",
              "LITECOIN",
              "DOGECOIN",
              "XRP",
              "SOLANA",
              "ZCASH",
              "MONERO",
              "COSMOS",
              "POLKADOT"
            ],
            "example": "TRON",
            "description": "Сеть (NetworkCode)."
          },
          "assetCode": {
            "type": "object",
            "example": "USDT_TRC20",
            "nullable": true,
            "description": "Валюта (Asset.code). null/опущено = на ВСЕ валюты этой сети."
          },
          "address": {
            "type": "string",
            "example": "TXYZ...abcd",
            "description": "Адрес для блокировки."
          },
          "reason": {
            "type": "object",
            "nullable": true,
            "description": "Причина внесения в чёрный список."
          },
          "groupCode": {
            "type": "string",
            "description": "Группа (code). По умолчанию manual. Нельзя добавлять в OFAC."
          }
        },
        "required": [
          "network",
          "address"
        ]
      },
      "BulkBlacklistItemDto": {
        "type": "object",
        "properties": {
          "network": {
            "type": "string",
            "enum": [
              "TRON",
              "TON",
              "ETHEREUM",
              "BSC",
              "POLYGON",
              "AVALANCHE",
              "BITCOIN",
              "LITECOIN",
              "DOGECOIN",
              "XRP",
              "SOLANA",
              "ZCASH",
              "MONERO",
              "COSMOS",
              "POLKADOT"
            ],
            "example": "TRON"
          },
          "address": {
            "type": "string",
            "example": "TXYZ...abcd",
            "description": "Адрес для блокировки."
          },
          "assetCode": {
            "type": "object",
            "nullable": true,
            "description": "Валюта (Asset.code). Пусто = все валюты сети."
          },
          "reason": {
            "type": "object",
            "nullable": true,
            "description": "Причина внесения."
          }
        },
        "required": [
          "network",
          "address"
        ]
      },
      "BulkCreateBlacklistDto": {
        "type": "object",
        "properties": {
          "items": {
            "description": "Адреса (макс. 1000).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkBlacklistItemDto"
            }
          },
          "groupCode": {
            "type": "string",
            "description": "Группа (code) для ВСЕХ строк. По умолчанию manual. Нельзя OFAC."
          }
        },
        "required": [
          "items"
        ]
      },
      "UpdateBlacklistDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Включена ли запись (false = временно отключить без удаления)."
          },
          "reason": {
            "type": "object",
            "nullable": true,
            "description": "Причина (пустая строка → null)."
          }
        }
      },
      "RunManualAmlCheckDto": {
        "type": "object",
        "properties": {
          "providerCode": {
            "type": "string",
            "example": "getblock",
            "description": "Код выбранного оператором провайдера (AML → Провайдеры)."
          },
          "network": {
            "type": "string",
            "example": "TRON",
            "description": "Код сети (NetworkCode)."
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "address": {
            "type": "string",
            "example": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
            "description": "Проверяемый адрес. Для tx-проверки — адрес получателя (выход транзакции, нужен провайдеру)."
          },
          "txHash": {
            "type": "string",
            "description": "Хеш транзакции (для checktx)."
          },
          "checkMethod": {
            "type": "string",
            "enum": [
              "address",
              "transaction",
              "both"
            ],
            "description": "Метод. По умолчанию: transaction если задан txHash, иначе address."
          },
          "contractAddress": {
            "type": "string",
            "description": "Адрес смарт-контракта токена (для резолва token_id у провайдера)."
          },
          "assetType": {
            "type": "string",
            "enum": [
              "native",
              "token"
            ],
            "description": "Тип актива."
          }
        },
        "required": [
          "providerCode",
          "network",
          "assetCode",
          "address"
        ]
      },
      "UpdateSanctionsSourceDto": {
        "type": "object",
        "properties": {}
      },
      "PublicAmlCurrencyDto": {
        "type": "object",
        "properties": {
          "network": {
            "type": "string",
            "enum": [
              "TRON",
              "TON",
              "ETHEREUM",
              "BSC",
              "POLYGON",
              "AVALANCHE",
              "BITCOIN",
              "LITECOIN",
              "DOGECOIN",
              "XRP",
              "SOLANA",
              "ZCASH",
              "MONERO",
              "COSMOS",
              "POLKADOT"
            ],
            "example": "TRON"
          },
          "symbol": {
            "type": "string",
            "example": "USDT"
          },
          "name": {
            "type": "string",
            "example": "Tether USD"
          },
          "contractAddress": {
            "type": "string",
            "nullable": true,
            "example": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
            "description": "Контракт токена (null = нативная валюта)."
          },
          "isToken": {
            "type": "boolean",
            "example": true
          }
        },
        "required": [
          "network",
          "symbol",
          "name",
          "contractAddress",
          "isToken"
        ]
      },
      "PublicAmlCurrenciesResponseDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicAmlCurrencyDto"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "CreatePublicAmlCheckDto": {
        "type": "object",
        "properties": {
          "network": {
            "type": "string",
            "enum": [
              "TRON",
              "TON",
              "ETHEREUM",
              "BSC",
              "POLYGON",
              "AVALANCHE",
              "BITCOIN",
              "LITECOIN",
              "DOGECOIN",
              "XRP",
              "SOLANA",
              "ZCASH",
              "MONERO",
              "COSMOS",
              "POLKADOT"
            ],
            "example": "TRON",
            "description": "Сеть адреса/транзакции."
          },
          "address": {
            "type": "string",
            "example": "TXYZ...abcd",
            "description": "Адрес для скрина (обязателен для method=address/both)."
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20",
            "description": "Код актива (как в /v1/public/aml/currencies или /v1/public/assets). Если не указан — берётся нативная валюта сети. Влияет на token-скрин (контракт токена)."
          },
          "txHash": {
            "type": "string",
            "example": "0xabc…",
            "description": "Хэш транзакции (для method=transaction/both)."
          },
          "checkMethod": {
            "type": "string",
            "enum": [
              "address",
              "transaction",
              "both"
            ],
            "description": "Метод: address (по умолчанию), transaction или both. По умолчанию — transaction если задан txHash, иначе address."
          }
        },
        "required": [
          "network",
          "address"
        ]
      },
      "PublicAmlCheckResponseDto": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "example": "0f1c…",
            "description": "ID проверки. Опрашивайте GET /v1/public/aml/checks/{uuid}."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "success",
              "failed",
              "error",
              "skipped"
            ],
            "example": "success",
            "description": "Жизненный цикл проверки: pending → success | failed | error | skipped."
          },
          "network": {
            "type": "string",
            "enum": [
              "TRON",
              "TON",
              "ETHEREUM",
              "BSC",
              "POLYGON",
              "AVALANCHE",
              "BITCOIN",
              "LITECOIN",
              "DOGECOIN",
              "XRP",
              "SOLANA",
              "ZCASH",
              "MONERO",
              "COSMOS",
              "POLKADOT"
            ],
            "example": "TRON"
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "address": {
            "type": "string",
            "example": "TXYZ...abcd"
          },
          "txHash": {
            "type": "string",
            "nullable": true,
            "example": null
          },
          "checkMethod": {
            "type": "string",
            "enum": [
              "address",
              "transaction",
              "both"
            ],
            "example": "address"
          },
          "riskScore": {
            "type": "string",
            "nullable": true,
            "example": "12.50",
            "description": "Риск-скор 0–100 (string). null если не success."
          },
          "riskLevel": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "severe"
            ],
            "nullable": true,
            "example": "low",
            "description": "low<50, medium 50–79, high ≥80, severe — санкции/терроризм/кража и т.п."
          },
          "topSignal": {
            "type": "string",
            "nullable": true,
            "example": "exchange",
            "description": "Топ-сигнал риска (категория)."
          },
          "signals": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            },
            "nullable": true,
            "description": "Карта сигналов риска → вес (0–1).",
            "example": {
              "exchange": 0.8,
              "gambling": 0.1
            }
          },
          "reportUrl": {
            "type": "string",
            "nullable": true,
            "description": "Ссылка на отчёт провайдера (если есть)."
          },
          "shareUrl": {
            "type": "string",
            "nullable": true,
            "description": "Публичная share-ссылка отчёта (если есть)."
          },
          "reason": {
            "type": "string",
            "nullable": true,
            "description": "Причина для skipped/error/failed (валюта не поддерживается, сбой провайдера и т.п.)."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-06-18T12:00:00.000Z"
          },
          "completedAt": {
            "type": "object",
            "format": "date-time",
            "nullable": true,
            "example": "2026-06-18T12:00:03.000Z"
          }
        },
        "required": [
          "uuid",
          "status",
          "network",
          "assetCode",
          "address",
          "txHash",
          "checkMethod",
          "riskScore",
          "riskLevel",
          "topSignal",
          "signals",
          "reportUrl",
          "shareUrl",
          "reason",
          "createdAt",
          "completedAt"
        ]
      },
      "UpdateNetworkSettingsDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "defaultConfirmations": {
            "type": "number"
          },
          "autoSweepEnabled": {
            "type": "boolean"
          },
          "monitoringHours": {
            "type": "number",
            "description": "Сколько часов сканер мониторит депозит-target на поступление (1-720). После — manual mode."
          },
          "monitoringIntervalFastSec": {
            "type": "number",
            "description": "Adaptive backoff: интервал проверки 0–2 часа после создания target (сек, 5-3600). Default 60."
          },
          "monitoringIntervalMediumSec": {
            "type": "number",
            "description": "Adaptive backoff: интервал 2–5 часов (сек, 5-3600). Default 300."
          },
          "monitoringIntervalSlowSec": {
            "type": "number",
            "description": "Adaptive backoff: интервал 5–10 часов (сек, 5-7200). Default 480."
          },
          "monitoringIntervalVerySlowSec": {
            "type": "number",
            "description": "Adaptive backoff: интервал 10+ часов до истечения monitoringHours (сек, 60-21600). Default 1800."
          },
          "expiredAutoCancelHours": {
            "type": "number",
            "description": "Часов в expired до авто-отмены (0-720). Default 24. 0 = выключить авто-отмену."
          },
          "extraConfig": {
            "type": "object",
            "description": "Network-specific JSON config"
          }
        }
      },
      "CreateProviderDto": {
        "type": "object",
        "properties": {
          "providerCode": {
            "type": "string",
            "example": "trongrid"
          },
          "priority": {
            "type": "number",
            "example": 1,
            "description": "1 = primary, 2+ = failover"
          },
          "url": {
            "type": "string",
            "example": "https://api.trongrid.io"
          },
          "apiKey": {
            "type": "string",
            "description": "Plaintext API key — будет зашифрован"
          },
          "extraHeaders": {
            "type": "object"
          },
          "rateLimitRps": {
            "type": "number",
            "example": 10
          },
          "timeoutMs": {
            "type": "number",
            "example": 15000
          },
          "circuitBreakerThreshold": {
            "type": "number",
            "example": 5
          },
          "role": {
            "type": "string",
            "enum": [
              "any",
              "critical",
              "analytics"
            ],
            "example": "any",
            "description": "Назначение провайдера: any (default), critical (broadcast/sign), analytics (read-only). Capability-routing в failover."
          }
        },
        "required": [
          "providerCode",
          "priority",
          "url"
        ]
      },
      "UpdateProviderDto": {
        "type": "object",
        "properties": {
          "providerCode": {
            "type": "string",
            "description": "Сменить тип провайдера (factory). Пример: jsonrpc → ankr. Должна быть зарегистрирована соответствующая factory."
          },
          "url": {
            "type": "string"
          },
          "priority": {
            "type": "number"
          },
          "rateLimitRps": {
            "type": "number"
          },
          "timeoutMs": {
            "type": "number"
          },
          "circuitBreakerThreshold": {
            "type": "number"
          },
          "enabled": {
            "type": "boolean"
          },
          "role": {
            "type": "string",
            "enum": [
              "any",
              "critical",
              "analytics"
            ],
            "description": "Сменить назначение провайдера: any / critical / analytics."
          },
          "extraHeaders": {
            "type": "object"
          }
        }
      },
      "RotateNetworkApiKeyDto": {
        "type": "object",
        "properties": {
          "newApiKey": {
            "type": "string",
            "description": "New plaintext API key"
          }
        },
        "required": [
          "newApiKey"
        ]
      },
      "LoginDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "example": "admin@exchanger.com"
          },
          "password": {
            "type": "string",
            "example": "CorrectHorseBatteryStaple1"
          }
        },
        "required": [
          "email",
          "password"
        ]
      },
      "TotpVerifyDto": {
        "type": "object",
        "properties": {
          "challenge": {
            "type": "string",
            "description": "Challenge token полученный из /auth/login"
          },
          "code": {
            "type": "string",
            "description": "6-значный TOTP-код или 8-символьный backup-code",
            "example": "123456"
          }
        },
        "required": [
          "challenge",
          "code"
        ]
      },
      "RefreshTokenDto": {
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string",
            "description": "Legacy: refresh token. Предпочитайте HttpOnly cookie wc_admin_refresh.",
            "deprecated": true
          }
        }
      },
      "ChangePasswordDto": {
        "type": "object",
        "properties": {
          "currentPassword": {
            "type": "string"
          },
          "newPassword": {
            "type": "string"
          }
        },
        "required": [
          "currentPassword",
          "newPassword"
        ]
      },
      "TotpConfirmDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "123456"
          }
        },
        "required": [
          "code"
        ]
      },
      "SetWebhooksEnabledDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Причина (для журнала аудита)",
            "maxLength": 500
          }
        }
      },
      "ReplayWebhooksDto": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "description": "Начало периода (ISO 8601)",
            "example": "2026-09-01T00:00:00Z"
          },
          "to": {
            "type": "string",
            "description": "Конец периода (ISO 8601), по умолчанию — сейчас"
          },
          "onlyFailed": {
            "type": "boolean",
            "description": "Только недоставленные (failed/skipped/pending). По умолчанию true",
            "default": true
          },
          "eventTypes": {
            "description": "Ограничить типами событий",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "from"
        ]
      },
      "CreatePublicDepositDto": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "example": "order_42_abc",
            "description": "order_id обменника. Уникален per site_id + asset. Если не указан — генерируется автоматически (уникальный код вида `NNNN-NNNN-NNNN`)."
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "expectedAmount": {
            "type": "string",
            "example": "100.50",
            "description": "Ожидаемая сумма как decimal-строка. По умолчанию — мин. сумма приёма валюты (asset.minDepositAmount)."
          },
          "comment": {
            "type": "string",
            "example": "User #42 deposit",
            "description": "Опциональный комментарий"
          },
          "lifetime": {
            "type": "number",
            "example": 3600,
            "minimum": 300,
            "maximum": 2592000,
            "description": "1.4.0: срок жизни депозита в секундах (окно мониторинга адреса). По умолчанию — окно сети из настроек (обычно 24 ч). Диапазон 300 с … 30 дней. По истечении депозит получает статус expired (оживляется через POST /deposits/{uuid}/refresh, если tx всё же пришла)."
          },
          "accuracyPaymentPercent": {
            "type": "number",
            "example": 1,
            "minimum": 0,
            "maximum": 100,
            "description": "1.4.0: допуск недоплаты в процентах именно для этого депозита (Heleket accuracy_payment_percent): received ≥ expected × (1 − N/100) считается оплаченным (paid). По умолчанию — настройка сайта / платформы."
          },
          "allowTopUp": {
            "type": "boolean",
            "example": true,
            "description": "1.4.0: режим доплаты. При недоплате депозит остаётся открытым до конца окна мониторинга: клиент досылает недостающую сумму на тот же адрес, суммы складываются (wrong_amount → paid). В ответе — объект `topUp` с remainingAmount и списком доплат. По умолчанию — настройка сайта."
          },
          "urlCallback": {
            "type": "string",
            "example": "https://shop.example.com/webhooks/wallet",
            "description": "1.4.0: webhook-URL именно для этого депозита (вместо callback_url сайта). Публичный http(s) хост."
          }
        },
        "required": [
          "assetCode"
        ]
      },
      "PublicDepositTransactionDto": {
        "type": "object",
        "properties": {
          "networkStatus": {
            "type": "string",
            "enum": [
              "pending",
              "mempool",
              "confirmed",
              "fail"
            ],
            "example": "confirmed",
            "description": "Статус транзакции в сети: pending (создана) → mempool (в мемпуле) → confirmed (подтверждена) | fail."
          },
          "receivedAmount": {
            "type": "string",
            "nullable": true,
            "example": "100.500000",
            "description": "Фактически полученная сумма (string). null пока tx не подтверждена."
          },
          "txhash": {
            "type": "string",
            "nullable": true,
            "example": "a1b2c3...e9f0",
            "description": "Хеш incoming blockchain-транзакции."
          },
          "confirmations": {
            "type": "number",
            "nullable": true,
            "example": 12,
            "description": "Текущее число подтверждений сети."
          },
          "requiredConfirmations": {
            "type": "number",
            "nullable": true,
            "example": 19,
            "description": "Сколько подтверждений требуется для финализации (asset.minConfirmations)."
          },
          "blockNumber": {
            "type": "string",
            "nullable": true,
            "example": "65123456",
            "description": "Номер блока (string, т.к. может превышать Number.MAX_SAFE_INTEGER). null если ещё в mempool."
          },
          "explorerTxUrl": {
            "type": "string",
            "nullable": true,
            "example": "https://tronscan.org/#/transaction/a1b2c3",
            "description": "Ссылка на транзакцию в explorer."
          },
          "detectedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Когда tx впервые замечена в сети."
          },
          "paidAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Когда депозит финализирован (paid / paid_over / wrong_amount). null пока не финализирован."
          },
          "fromAddress": {
            "type": "string",
            "nullable": true,
            "description": "1.4.0: адрес отправителя входящей tx (source of funds)."
          }
        },
        "required": [
          "networkStatus",
          "receivedAmount",
          "txhash",
          "confirmations",
          "requiredConfirmations",
          "blockNumber",
          "explorerTxUrl",
          "detectedAt",
          "paidAt",
          "fromAddress"
        ]
      },
      "PublicDepositTopUpTxDto": {
        "type": "object",
        "properties": {
          "txhash": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "example": "10.5"
          },
          "fromAddress": {
            "type": "string"
          },
          "confirmations": {
            "type": "number",
            "example": 3
          },
          "requiredConfirmations": {
            "type": "number",
            "example": 19
          },
          "confirmed": {
            "type": "boolean",
            "example": false
          },
          "detectedAt": {
            "type": "string",
            "format": "date-time"
          },
          "confirmedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "txhash",
          "amount",
          "fromAddress",
          "confirmations",
          "requiredConfirmations",
          "confirmed",
          "detectedAt",
          "confirmedAt"
        ]
      },
      "PublicDepositTopUpDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "example": true
          },
          "waiting": {
            "type": "boolean",
            "example": true,
            "description": "Окно доплаты открыто — ждём ещё средств (status wrong_amount не финален)."
          },
          "remainingAmount": {
            "type": "string",
            "nullable": true,
            "example": "39.5",
            "description": "Сколько ещё нужно прислать (expected − received)."
          },
          "closedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Окно закрыто (истёк срок) — итог wrong_amount."
          },
          "txs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicDepositTopUpTxDto"
            }
          }
        },
        "required": [
          "enabled",
          "waiting",
          "remainingAmount",
          "closedAt",
          "txs"
        ]
      },
      "PublicDepositStaticAddressDto": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "orderId": {
            "type": "string",
            "example": "customer-42",
            "description": "orderId статического адреса."
          },
          "label": {
            "type": "string",
            "nullable": true,
            "example": "Ivan"
          }
        },
        "required": [
          "uuid",
          "orderId",
          "label"
        ]
      },
      "PublicDepositRefundDto": {
        "type": "object",
        "properties": {
          "payoutUuid": {
            "type": "string",
            "format": "uuid",
            "description": "UUID выплаты-возврата (GET /v1/public/payouts/{uuid})."
          },
          "status": {
            "type": "string",
            "example": "pending_approval",
            "description": "Статус выплаты-возврата (new … confirmed | failed | rejected | cancelled)."
          },
          "amount": {
            "type": "string",
            "example": "95.5"
          },
          "destinationAddress": {
            "type": "string",
            "example": "TXYZ…"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "payoutUuid",
          "status",
          "amount",
          "destinationAddress",
          "createdAt",
          "updatedAt"
        ]
      },
      "PublicDepositResponseDto": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Публичный идентификатор депозита (используйте в GET /{uuid})."
          },
          "orderId": {
            "type": "string",
            "example": "order_42_abc",
            "description": "Ваш order_id (label), переданный при создании."
          },
          "address": {
            "type": "string",
            "example": "TXYZ...abcd",
            "description": "Адрес для оплаты. Для memo-based сетей (TON) — общий приёмный адрес + memo."
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "example": "WP-1A2B3C4D",
            "description": "Memo/comment (ОБЯЗАТЕЛЕН для memo-based сетей, иначе null)."
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "expectedAmount": {
            "type": "string",
            "example": "100.50",
            "description": "Ожидаемая сумма (string). 0 = принимаем любую сумму."
          },
          "status": {
            "type": "string",
            "enum": [
              "check",
              "process",
              "confirm_check",
              "paid",
              "paid_over",
              "wrong_amount",
              "expired",
              "cancel",
              "fail",
              "system_fail",
              "refund_process",
              "refund_paid",
              "refund_fail"
            ],
            "example": "check",
            "description": "Бизнес-статус депозита (полный набор). Поток: check → process → confirm_check → paid | paid_over | wrong_amount. Терминальные/прочие: expired (окно мониторинга истекло), cancel, fail, system_fail, refund_process → refund_paid | refund_fail."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "До какого момента сеть мониторится на оплату."
          },
          "explorerAddressUrl": {
            "type": "string",
            "nullable": true,
            "example": "https://tronscan.org/#/address/TXYZ",
            "description": "Ссылка на адрес в explorer."
          },
          "transaction": {
            "nullable": true,
            "description": "On-chain данные incoming-транзакции. null пока депозит не получил ни одной tx.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicDepositTransactionDto"
              }
            ]
          },
          "network": {
            "type": "string",
            "example": "TRON",
            "description": "1.4.0: сеть актива."
          },
          "isFinal": {
            "type": "boolean",
            "example": false,
            "description": "1.4.0: терминальный ли статус — можно прекращать поллинг."
          },
          "amountUsd": {
            "type": "string",
            "nullable": true,
            "example": "100.50",
            "description": "1.4.0: оценка суммы в USD (полученной, иначе ожидаемой)."
          },
          "rateUsd": {
            "type": "string",
            "nullable": true,
            "example": "1.00",
            "description": "1.4.0: курс актива к USD на момент ответа."
          },
          "commission": {
            "type": "string",
            "nullable": true,
            "example": "0.50",
            "description": "1.4.0: комиссия обменника (если учёт включён и депозит финализирован)."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "1.4.0: время создания депозита."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "1.4.0: время последнего изменения статуса."
          },
          "accuracyPaymentPercent": {
            "type": "string",
            "nullable": true,
            "example": "1.00",
            "description": "1.4.0: допуск недоплаты (%) для этого депозита; null — по настройкам сайта/платформы."
          },
          "allowTopUp": {
            "type": "boolean",
            "example": false,
            "description": "1.4.0: режим доплаты включён."
          },
          "topUp": {
            "nullable": true,
            "description": "1.4.0: состояние режима доплаты (null, если выключен).",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicDepositTopUpDto"
              }
            ]
          },
          "staticAddress": {
            "nullable": true,
            "description": "1.4.0: платёж на статический адрес — ссылка на родительский адрес (null для обычных депозитов).",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicDepositStaticAddressDto"
              }
            ]
          },
          "refund": {
            "nullable": true,
            "description": "1.4.0: последняя выплата-возврат депозита (null — возврат не запрашивался).",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicDepositRefundDto"
              }
            ]
          }
        },
        "required": [
          "uuid",
          "orderId",
          "address",
          "memo",
          "assetCode",
          "expectedAmount",
          "status",
          "expiresAt",
          "explorerAddressUrl",
          "transaction",
          "network",
          "isFinal",
          "amountUsd",
          "rateUsd",
          "commission",
          "createdAt",
          "updatedAt",
          "accuracyPaymentPercent",
          "allowTopUp",
          "topUp",
          "staticAddress",
          "refund"
        ]
      },
      "PublicListMetaDto": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number",
            "example": 1
          },
          "perPage": {
            "type": "number",
            "example": 20
          },
          "total": {
            "type": "number",
            "example": 137,
            "description": "Всего записей (для всех страниц)."
          },
          "nextCursor": {
            "type": "string",
            "nullable": true,
            "example": "MTIzNDU",
            "description": "1.4.0: курсор следующей страницы (keyset-пагинация). Передайте его в `?cursor=` — получите следующую порцию без сдвига при появлении новых записей. null — страниц больше нет. Присутствует только если запрос шёл по курсору или это первая страница."
          }
        },
        "required": [
          "page",
          "perPage",
          "total"
        ]
      },
      "PublicDepositListResponseDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicDepositResponseDto"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PublicListMetaDto"
          }
        },
        "required": [
          "items",
          "meta"
        ]
      },
      "PublicDepositAmlResponseDto": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Публичный идентификатор депозита (тот же, что в GET /{uuid})."
          },
          "orderId": {
            "type": "string",
            "example": "order_42_abc",
            "description": "Ваш order_id (label), переданный при создании."
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "network": {
            "type": "string",
            "example": "TRON",
            "description": "Код сети депозита."
          },
          "senderAddress": {
            "type": "string",
            "nullable": true,
            "example": "TSenderAddrXyz...",
            "description": "Адрес отправителя входящей транзакции — именно он проходит AML-скрин. null пока tx не замечена."
          },
          "amlStatus": {
            "type": "string",
            "enum": [
              "not_checked",
              "passed",
              "flagged",
              "hold",
              "rejected"
            ],
            "example": "passed",
            "description": "Итоговый AML-статус депозита: not_checked (не проверялся / AML выкл) → passed (чисто) | flagged (подозрительно, но не блок) | hold (заблокирован, ждёт ручного решения) | rejected (отклонён)."
          },
          "checkState": {
            "type": "string",
            "enum": [
              "pending",
              "success",
              "failed",
              "error",
              "skipped"
            ],
            "nullable": true,
            "example": "success",
            "description": "Состояние запроса к провайдеру: pending | success | failed | error | skipped (НЕ значит «чисто»)."
          },
          "riskScore": {
            "type": "string",
            "nullable": true,
            "example": "12.50",
            "description": "Risk-score 0–100 (string). null если проверки не было."
          },
          "riskLevel": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "severe"
            ],
            "nullable": true,
            "example": "low",
            "description": "Уровень риска. severe = sanctions/terrorism/stolen/child_exploitation (блок независимо от score)."
          },
          "decision": {
            "type": "string",
            "enum": [
              "pass",
              "flag",
              "block"
            ],
            "nullable": true,
            "example": "pass",
            "description": "Решение скрининга: pass | flag | block."
          },
          "provider": {
            "type": "string",
            "nullable": true,
            "example": "getblock",
            "description": "Код AML-провайдера."
          },
          "topSignal": {
            "type": "string",
            "nullable": true,
            "example": "mixer",
            "description": "Топ-сигнал риска (категория с максимальным весом): mixer | sanctions | scam | darknet | …"
          },
          "signals": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            },
            "nullable": true,
            "example": {
              "mixer": 0.8,
              "scam": 0.1
            },
            "description": "Карта сигналов риска и их весов (0..1). null если провайдер их не вернул."
          },
          "reportUrl": {
            "type": "string",
            "nullable": true,
            "description": "Ссылка на полный отчёт провайдера (если есть)."
          },
          "shareUrl": {
            "type": "string",
            "nullable": true,
            "description": "Публичная share-ссылка на отчёт (если есть)."
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Когда выполнен AML-скрин. null если проверки не было."
          },
          "manualAction": {
            "type": "string",
            "enum": [
              "release",
              "quarantine_now"
            ],
            "nullable": true,
            "example": null,
            "description": "Ручное действие оператора над заблокированным депозитом: release (разрешить свип) | quarantine_now."
          },
          "manualActionAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Когда применено ручное действие."
          },
          "manualActionReason": {
            "type": "string",
            "nullable": true,
            "description": "Причина ручного действия (комментарий оператора)."
          }
        },
        "required": [
          "uuid",
          "orderId",
          "assetCode",
          "network",
          "senderAddress",
          "amlStatus",
          "checkState",
          "riskScore",
          "riskLevel",
          "decision",
          "provider",
          "topSignal",
          "signals",
          "reportUrl",
          "shareUrl",
          "checkedAt",
          "manualAction",
          "manualActionAt",
          "manualActionReason"
        ]
      },
      "CreateAdminDepositDto": {
        "type": "object",
        "properties": {
          "siteUuid": {
            "type": "string",
            "description": "Site UUID"
          },
          "orderId": {
            "type": "string",
            "description": "External order id (your reference). Если не указан — генерируется автоматически (уникальный код вида `NNNN-NNNN-NNNN`). Если указан — проверяется уникальность в рамках сайта (deposit + payout)."
          },
          "assetCode": {
            "type": "string",
            "description": "Asset code (e.g. TRX, USDT_TRC20, GRAM)"
          },
          "expectedAmount": {
            "type": "string",
            "description": "Expected amount as decimal string. Если не указан — по умолчанию мин. сумма приёма валюты (asset.minDepositAmount).",
            "example": "10.0"
          },
          "comment": {
            "type": "string"
          }
        },
        "required": [
          "siteUuid",
          "assetCode"
        ]
      },
      "ManualDepositStatusDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "paid",
              "fail",
              "cancel",
              "system_fail"
            ]
          },
          "reason": {
            "type": "string",
            "description": "Причина ручной смены (в аудит-лог)."
          }
        },
        "required": [
          "status"
        ]
      },
      "AmlDecisionDto": {
        "type": "object",
        "properties": {}
      },
      "BatchSweepDto": {
        "type": "object",
        "properties": {}
      },
      "CreateStaticAddressDto": {
        "type": "object",
        "properties": {
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "orderId": {
            "type": "string",
            "example": "customer-42",
            "description": "Ваш идентификатор владельца адреса (клиент/аккаунт). Уникален в рамках сайта; повтор возвращает тот же адрес."
          },
          "label": {
            "type": "string",
            "example": "Иван, аккаунт #42",
            "description": "Метка для админки и вебхуков."
          },
          "sweepDestinationWalletUuid": {
            "type": "string",
            "description": "UUID системного кошелька-получателя свипа (active, та же сеть)."
          },
          "urlCallback": {
            "type": "string",
            "example": "https://shop.example.com/webhooks/wallet",
            "description": "1.4.0: webhook-URL для платежей на этот адрес (вместо callback_url сайта)."
          }
        },
        "required": [
          "assetCode",
          "orderId"
        ]
      },
      "StaticAddressResponseDto": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "orderId": {
            "type": "string",
            "example": "customer-42"
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "network": {
            "type": "string",
            "example": "TRON"
          },
          "address": {
            "type": "string"
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "description": "Memo для memo-based сетей (постоянный)."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disabled"
            ]
          },
          "explorerAddressUrl": {
            "type": "string",
            "nullable": true
          },
          "paymentsCount": {
            "type": "number",
            "example": 3,
            "description": "Число платежей (дочерних депозитов)."
          },
          "totalReceived": {
            "type": "string",
            "example": "350.5",
            "description": "Сумма финализированных платежей."
          },
          "lastPaymentAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "uuid",
          "orderId",
          "label",
          "assetCode",
          "network",
          "address",
          "memo",
          "status",
          "explorerAddressUrl",
          "paymentsCount",
          "totalReceived",
          "lastPaymentAt",
          "createdAt"
        ]
      },
      "StaticAddressListResponseDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaticAddressResponseDto"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PublicListMetaDto"
          }
        },
        "required": [
          "items",
          "meta"
        ]
      },
      "LookupBatchDto": {
        "type": "object",
        "properties": {
          "items": {
            "description": "Array of { network, address } to resolve in single request.",
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "CreateAddressBookEntryDto": {
        "type": "object",
        "properties": {
          "network": {
            "type": "string",
            "enum": [
              "TRON",
              "TON",
              "ETHEREUM",
              "BSC",
              "POLYGON",
              "AVALANCHE",
              "BITCOIN",
              "LITECOIN",
              "DOGECOIN",
              "XRP",
              "SOLANA",
              "ZCASH",
              "MONERO",
              "COSMOS",
              "POLKADOT"
            ],
            "description": "Network code from Prisma enum (single source of truth)."
          },
          "address": {
            "type": "string",
            "example": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
          },
          "label": {
            "type": "string",
            "example": "Binance Hot 7"
          },
          "color": {
            "type": "string",
            "enum": [
              "blue",
              "green",
              "amber",
              "red",
              "purple",
              "pink",
              "sky",
              "zinc",
              "orange",
              "teal"
            ],
            "example": "blue"
          },
          "notes": {
            "type": "string",
            "description": "Free-form operator notes (max 2000 chars)."
          }
        },
        "required": [
          "network",
          "address",
          "label",
          "color"
        ]
      },
      "UpdateAddressBookEntryDto": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "enum": [
              "blue",
              "green",
              "amber",
              "red",
              "purple",
              "pink",
              "sky",
              "zinc",
              "orange",
              "teal"
            ]
          },
          "notes": {
            "type": "object"
          }
        }
      },
      "CreateInvoiceDto": {
        "type": "object",
        "properties": {
          "siteUuid": {
            "type": "string",
            "description": "Site UUID — для какого сайта (приёмные кошельки/настройки сети)."
          },
          "assetCode": {
            "type": "string",
            "description": "Код актива (TRX, USDT_TRC20, GRAM, USDT_TON, …)."
          },
          "expectedAmount": {
            "type": "string",
            "description": "Сумма к оплате в АКТИВЕ (decimal-строка; строго > 0). Ровно одно из expectedAmount / amountUsd.",
            "example": "100.50"
          },
          "amountUsd": {
            "type": "string",
            "description": "USD-пег: сумма счёта в долларах. Крипто-сумма фиксируется по курсу оракула на момент выставления (округление вверх до decimals актива). Ровно одно из expectedAmount / amountUsd.",
            "example": "50.00"
          },
          "ttlMinutes": {
            "type": "number",
            "description": "Срок действия счёта в минутах (после него — «просрочен», публичная ссылка живёт ещё 1 день).",
            "minimum": 5,
            "maximum": 43200,
            "example": 60
          },
          "title": {
            "type": "string",
            "description": "Заголовок/назначение платежа (показывается клиенту)."
          },
          "description": {
            "type": "string",
            "description": "Описание (показывается клиенту)."
          },
          "sweepDestinationWalletUuid": {
            "type": "string",
            "description": "UUID системного кошелька-получателя свипа после оплаты. Не указан → дефолтная маршрутизация (обычно hot). Кошелёк должен быть active, той же сети что актив, роли hot/admin/payout/cold."
          },
          "urlReturn": {
            "type": "string",
            "description": "Ссылка «Вернуться в магазин» на странице оплаты (http/https).",
            "example": "https://shop.example/cart"
          },
          "urlSuccess": {
            "type": "string",
            "description": "Куда автоматически перенаправить клиента после подтверждённой оплаты (через 5 с, с кнопкой). Платформа добавит query: ?order_id=…&invoice=<uuid>&status=paid|overpaid.",
            "example": "https://shop.example/thanks"
          },
          "urlCallback": {
            "type": "string",
            "description": "Webhook-URL именно для этого счёта — события депозита счёта уйдут сюда вместо callback_url сайта (подпись тем же секретом сайта). Приватные адреса — по настройке webhook.allow_private_urls.",
            "example": "https://shop.example/hooks/wallet"
          },
          "theme": {
            "type": "string",
            "enum": [
              "light",
              "dark",
              "auto"
            ],
            "description": "Тема страницы оплаты. По умолчанию — настройка сайта / auto."
          },
          "locale": {
            "type": "string",
            "enum": [
              "ru",
              "en"
            ],
            "description": "Язык страницы оплаты. По умолчанию — настройка сайта / ru."
          },
          "accuracyPaymentPercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "1.4.0: допуск недоплаты (%) для депозита счёта."
          },
          "allowTopUp": {
            "type": "boolean",
            "description": "1.4.0: режим доплаты — при недоплате клиент может дослать остаток на тот же адрес."
          }
        },
        "required": [
          "siteUuid",
          "assetCode",
          "ttlMinutes"
        ]
      },
      "InvoiceAdminResponseDto": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "token": {
            "type": "string",
            "description": "Публичный токен ссылки."
          },
          "publicPath": {
            "type": "string",
            "description": "Относительный путь публичной страницы (абсолютную ссылку строит фронт)."
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "assetCode": {
            "type": "string"
          },
          "network": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "memo": {
            "type": "string",
            "nullable": true
          },
          "expectedAmount": {
            "type": "string"
          },
          "pegUsdAmount": {
            "type": "string",
            "nullable": true,
            "description": "USD-пег счёта (null = счёт в активе)."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "publicLinkEnabled": {
            "type": "boolean"
          },
          "disabledAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "detected",
              "paid",
              "overpaid",
              "underpaid",
              "underpaid_waiting",
              "refunded",
              "expired"
            ]
          },
          "receivedAmount": {
            "type": "string",
            "nullable": true
          },
          "confirmations": {
            "type": "number",
            "nullable": true
          },
          "txhash": {
            "type": "string",
            "nullable": true
          },
          "depositUuid": {
            "type": "string",
            "format": "uuid",
            "description": "UUID связанного депозита."
          },
          "sweepDestination": {
            "type": "object",
            "nullable": true,
            "description": "Кошелёк-получатель свипа (override). null = дефолтная маршрутизация (hot).",
            "properties": {
              "uuid": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "role": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "uuid",
          "token",
          "publicPath",
          "title",
          "assetCode",
          "network",
          "address",
          "memo",
          "expectedAmount",
          "pegUsdAmount",
          "expiresAt",
          "publicLinkEnabled",
          "disabledAt",
          "createdAt",
          "state",
          "receivedAmount",
          "confirmations",
          "txhash",
          "depositUuid",
          "sweepDestination"
        ]
      },
      "InvoiceListResponseDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceAdminResponseDto"
            }
          },
          "total": {
            "type": "number",
            "example": 42
          }
        },
        "required": [
          "items",
          "total"
        ]
      },
      "CreatePublicInvoiceDto": {
        "type": "object",
        "properties": {
          "assetCode": {
            "type": "string",
            "description": "Код актива (TRX, USDT_TRC20, GRAM, USDT_TON, …)."
          },
          "amount": {
            "type": "string",
            "description": "Сумма к оплате в АКТИВЕ (decimal-строка; строго > 0). Ровно одно из amount / amountUsd.",
            "example": "100.50"
          },
          "amountUsd": {
            "type": "string",
            "description": "USD-пег: сумма счёта в долларах; крипто-сумма фиксируется по курсу на момент выставления. Ровно одно из amount / amountUsd. 409 PROVIDER_UNAVAILABLE если у оракула нет курса актива.",
            "example": "50.00"
          },
          "ttlMinutes": {
            "type": "number",
            "description": "Срок действия в минутах (по умолчанию 60). После — счёт просрочен, ссылка живёт ещё 1 день.",
            "minimum": 5,
            "maximum": 43200,
            "default": 60
          },
          "orderId": {
            "type": "string",
            "description": "Ваш order_id. Если не указан — сгенерируется. Уникален в рамках сайта."
          },
          "title": {
            "type": "string",
            "description": "Заголовок/назначение (показывается клиенту)."
          },
          "description": {
            "type": "string",
            "description": "Описание (показывается клиенту)."
          },
          "sweepDestinationWalletUuid": {
            "type": "string",
            "description": "UUID системного кошелька-получателя свипа после оплаты. Не указан → дефолтная маршрутизация. Кошелёк должен быть active, той же сети что актив, роли hot/admin/payout/cold."
          },
          "urlReturn": {
            "type": "string",
            "description": "Ссылка «Вернуться в магазин» на странице оплаты (http/https).",
            "example": "https://shop.example/cart"
          },
          "urlSuccess": {
            "type": "string",
            "description": "Куда автоматически перенаправить клиента после подтверждённой оплаты (через 5 с, с кнопкой). Платформа добавит query: ?order_id=…&invoice=<uuid>&status=paid|overpaid.",
            "example": "https://shop.example/thanks"
          },
          "urlCallback": {
            "type": "string",
            "description": "Webhook-URL именно для этого счёта — события депозита счёта уйдут сюда вместо callback_url сайта (подпись тем же секретом сайта). Приватные адреса — по настройке webhook.allow_private_urls.",
            "example": "https://shop.example/hooks/wallet"
          },
          "theme": {
            "type": "string",
            "enum": [
              "light",
              "dark",
              "auto"
            ],
            "description": "Тема страницы оплаты. По умолчанию — настройка сайта / auto."
          },
          "locale": {
            "type": "string",
            "enum": [
              "ru",
              "en"
            ],
            "description": "Язык страницы оплаты. По умолчанию — настройка сайта / ru."
          },
          "accuracyPaymentPercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "1.4.0: допуск недоплаты (%) для депозита счёта."
          },
          "allowTopUp": {
            "type": "boolean",
            "description": "1.4.0: режим доплаты — при недоплате клиент может дослать остаток на тот же адрес."
          }
        },
        "required": [
          "assetCode"
        ]
      },
      "PublicInvoiceCreatedDto": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "orderId": {
            "type": "string",
            "description": "Ваш order_id (или сгенерированный)."
          },
          "token": {
            "type": "string",
            "description": "Публичный токен ссылки."
          },
          "payPath": {
            "type": "string",
            "description": "Путь страницы оплаты. Абсолютная ссылка: https://<ваш-домен-кошелька>{payPath}.",
            "example": "/invoice/abc123"
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "network": {
            "type": "string",
            "example": "TRON"
          },
          "address": {
            "type": "string",
            "description": "Адрес для оплаты."
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "description": "Memo (для memo-based сетей)."
          },
          "amount": {
            "type": "string",
            "example": "100.50"
          },
          "amountUsd": {
            "type": "string",
            "nullable": true,
            "description": "USD-пег счёта (null = счёт выставлен в активе)."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "detected",
              "paid",
              "overpaid",
              "underpaid",
              "underpaid_waiting",
              "refunded",
              "expired"
            ]
          },
          "payUrl": {
            "type": "string",
            "nullable": true,
            "description": "1.4.0: абсолютная ссылка на страницу оплаты (если оператор задал базовый адрес)."
          },
          "urlReturn": {
            "type": "string",
            "nullable": true
          },
          "urlSuccess": {
            "type": "string",
            "nullable": true
          },
          "urlCallback": {
            "type": "string",
            "nullable": true
          },
          "theme": {
            "type": "string",
            "nullable": true,
            "enum": [
              "light",
              "dark",
              "auto"
            ]
          },
          "locale": {
            "type": "string",
            "nullable": true,
            "enum": [
              "ru",
              "en"
            ]
          },
          "receivedAmount": {
            "type": "string",
            "nullable": true,
            "description": "Полученная сумма (после детекции tx)."
          },
          "txhash": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "uuid",
          "orderId",
          "token",
          "payPath",
          "assetCode",
          "network",
          "address",
          "memo",
          "amount",
          "amountUsd",
          "expiresAt",
          "status",
          "payUrl",
          "urlReturn",
          "urlSuccess",
          "urlCallback",
          "theme",
          "locale",
          "receivedAmount",
          "txhash",
          "createdAt"
        ]
      },
      "PublicInvoiceListResponseDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicInvoiceCreatedDto"
            }
          },
          "meta": {
            "type": "object",
            "example": {
              "page": 1,
              "perPage": 20,
              "total": 5
            }
          }
        },
        "required": [
          "items",
          "meta"
        ]
      },
      "InvoiceBrandingDto": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "example": "WalletCore"
          },
          "primaryColor": {
            "type": "string",
            "example": "#3b82f6"
          },
          "logoUrl": {
            "type": "string",
            "nullable": true,
            "description": "1.4.0: логотип сайта."
          },
          "supportUrl": {
            "type": "string",
            "nullable": true,
            "description": "1.4.0: ссылка «Поддержка»."
          },
          "locale": {
            "type": "string",
            "enum": [
              "ru",
              "en"
            ]
          },
          "theme": {
            "type": "string",
            "enum": [
              "light",
              "dark",
              "auto"
            ]
          }
        },
        "required": [
          "displayName",
          "primaryColor",
          "logoUrl",
          "supportUrl",
          "locale",
          "theme"
        ]
      },
      "InvoicePublicResponseDto": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "assetSymbol": {
            "type": "string",
            "example": "USDT"
          },
          "assetName": {
            "type": "string",
            "example": "Tether USD (TRC-20)"
          },
          "network": {
            "type": "string",
            "example": "TRON"
          },
          "address": {
            "type": "string",
            "description": "Адрес для оплаты (показывается + QR)."
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "description": "Memo (ОБЯЗАТЕЛЕН для memo-based сетей, иначе null)."
          },
          "expectedAmount": {
            "type": "string",
            "example": "100.50"
          },
          "amountUsd": {
            "type": "string",
            "nullable": true,
            "example": "100.42",
            "description": "USD-эквивалент (best-effort)."
          },
          "pegUsdAmount": {
            "type": "string",
            "nullable": true,
            "description": "USD-пег: сумма счёта в долларах (курс зафиксирован при выставлении)."
          },
          "pegRate": {
            "type": "string",
            "nullable": true,
            "description": "Курс фиксации (USD за 1 единицу актива), только для пег-счетов."
          },
          "decimals": {
            "type": "number",
            "example": 6
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "Срок оплаты (для обратного отсчёта)."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "detected",
              "paid",
              "overpaid",
              "underpaid",
              "underpaid_waiting",
              "refunded",
              "expired"
            ],
            "description": "Состояние оплаты для UI."
          },
          "paymentStatus": {
            "type": "string",
            "description": "Сырой статус депозита."
          },
          "receivedAmount": {
            "type": "string",
            "nullable": true
          },
          "confirmations": {
            "type": "number",
            "nullable": true
          },
          "requiredConfirmations": {
            "type": "number",
            "example": 19
          },
          "txhash": {
            "type": "string",
            "nullable": true
          },
          "explorerTxUrl": {
            "type": "string",
            "nullable": true
          },
          "explorerAddressUrl": {
            "type": "string",
            "nullable": true
          },
          "paidAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remainingAmount": {
            "type": "string",
            "nullable": true,
            "description": "1.4.0: в состоянии underpaid_waiting — сколько ещё нужно прислать."
          },
          "branding": {
            "$ref": "#/components/schemas/InvoiceBrandingDto"
          },
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "1.4.0"
          },
          "orderId": {
            "type": "string",
            "description": "1.4.0: order_id счёта (для редиректов)."
          },
          "urlReturn": {
            "type": "string",
            "nullable": true,
            "description": "1.4.0: ссылка «Вернуться в магазин»."
          },
          "urlSuccess": {
            "type": "string",
            "nullable": true,
            "description": "1.4.0: авто-редирект после оплаты."
          },
          "theme": {
            "type": "string",
            "enum": [
              "light",
              "dark",
              "auto"
            ]
          },
          "locale": {
            "type": "string",
            "enum": [
              "ru",
              "en"
            ]
          }
        },
        "required": [
          "token",
          "title",
          "description",
          "assetCode",
          "assetSymbol",
          "assetName",
          "network",
          "address",
          "memo",
          "expectedAmount",
          "amountUsd",
          "pegUsdAmount",
          "pegRate",
          "decimals",
          "expiresAt",
          "createdAt",
          "state",
          "paymentStatus",
          "receivedAmount",
          "confirmations",
          "requiredConfirmations",
          "txhash",
          "explorerTxUrl",
          "explorerAddressUrl",
          "paidAt",
          "remainingAmount",
          "branding",
          "uuid",
          "orderId",
          "urlReturn",
          "urlSuccess",
          "theme",
          "locale"
        ]
      },
      "InvoicePublicStatusDto": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "detected",
              "paid",
              "overpaid",
              "underpaid",
              "underpaid_waiting",
              "refunded",
              "expired"
            ]
          },
          "paymentStatus": {
            "type": "string"
          },
          "receivedAmount": {
            "type": "string",
            "nullable": true
          },
          "confirmations": {
            "type": "number",
            "nullable": true
          },
          "requiredConfirmations": {
            "type": "number"
          },
          "txhash": {
            "type": "string",
            "nullable": true
          },
          "explorerTxUrl": {
            "type": "string",
            "nullable": true
          },
          "paidAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "state",
          "paymentStatus",
          "receivedAmount",
          "confirmations",
          "requiredConfirmations",
          "txhash",
          "explorerTxUrl",
          "paidAt",
          "expiresAt"
        ]
      },
      "CreatePublicPayoutDto": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string"
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "destinationAddress": {
            "type": "string",
            "example": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
          },
          "destinationMemo": {
            "type": "string",
            "example": "WP-XXXXXXXX",
            "description": "Memo для memo-based сетей (TON Jetton)"
          },
          "amount": {
            "type": "string",
            "example": "50.00"
          },
          "priority": {
            "type": "string",
            "enum": [
              "economy",
              "recommended",
              "high"
            ],
            "default": "recommended",
            "description": "1.4.0: приоритет сетевой комиссии. economy — дешевле/дольше, high — дороже/быстрее. Учитывается сетями с рынком комиссий (EVM gas, UTXO sat/vB); остальные игнорируют."
          },
          "urlCallback": {
            "type": "string",
            "example": "https://shop.example.com/webhooks/wallet",
            "description": "1.4.0: webhook-URL именно для этой выплаты (вместо callback_url сайта). Публичный http(s) хост."
          }
        },
        "required": [
          "orderId",
          "assetCode",
          "destinationAddress",
          "amount"
        ]
      },
      "PublicPayoutResponseDto": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Публичный идентификатор выплаты."
          },
          "orderId": {
            "type": "string",
            "example": "payout_77",
            "description": "Ваш order_id (label)."
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "pending_approval",
              "approved",
              "rejected",
              "queued",
              "signing",
              "broadcasted",
              "confirmed",
              "failed",
              "cancelled"
            ],
            "example": "queued",
            "description": "Бизнес-статус выплаты (полный набор). Поток: new → pending_approval → approved → queued → signing → broadcasted → confirmed. Терминальные: rejected (отклонена оператором), failed (ошибка broadcast/revert), cancelled (отменена до подписи)."
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "destinationAddress": {
            "type": "string",
            "example": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
            "description": "Адрес получателя."
          },
          "destinationMemo": {
            "type": "string",
            "nullable": true,
            "example": null,
            "description": "Memo получателя (для memo-based сетей), иначе null."
          },
          "amount": {
            "type": "string",
            "example": "50.000000",
            "description": "Сумма выплаты (string)."
          },
          "requiresApproval": {
            "type": "boolean",
            "example": false,
            "description": "Требуется ли ручное одобрение оператором."
          },
          "txHash": {
            "type": "string",
            "nullable": true,
            "example": "a1b2c3...e9f0",
            "description": "Хеш исходящей blockchain-tx (после broadcast). null пока не отправлена."
          },
          "confirmations": {
            "type": "number",
            "nullable": true,
            "example": 12,
            "description": "Текущее число подтверждений сети для исходящей tx. null пока не отправлена."
          },
          "requiredConfirmations": {
            "type": "number",
            "nullable": true,
            "example": 19,
            "description": "Сколько подтверждений нужно для финализации (asset.minConfirmations). null пока не отправлена."
          },
          "networkStatus": {
            "type": "string",
            "enum": [
              "pending",
              "mempool",
              "confirmed",
              "fail"
            ],
            "nullable": true,
            "example": "confirmed",
            "description": "On-chain статус исходящей tx: pending → mempool → confirmed | fail. null пока не отправлена."
          },
          "explorerTxUrl": {
            "type": "string",
            "nullable": true,
            "example": "https://tronscan.org/#/transaction/a1b2c3",
            "description": "Ссылка на исходящую tx в explorer."
          },
          "failReason": {
            "type": "string",
            "nullable": true,
            "description": "Причина ошибки (для status=failed/rejected/cancelled), иначе null."
          },
          "approvedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Когда выплата одобрена оператором. null если ещё не одобрена / auto-approve."
          },
          "broadcastedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Когда tx отправлена в сеть (broadcast). null пока не отправлена."
          },
          "confirmedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Когда выплата подтверждена сетью. null пока не подтверждена."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Время создания выплаты."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Время последнего обновления."
          },
          "network": {
            "type": "string",
            "example": "TRON",
            "description": "1.4.0: сеть актива."
          },
          "isFinal": {
            "type": "boolean",
            "example": false,
            "description": "1.4.0: терминальный ли статус — можно прекращать поллинг."
          },
          "priority": {
            "type": "string",
            "enum": [
              "economy",
              "recommended",
              "high"
            ],
            "example": "recommended",
            "description": "1.4.0: приоритет сетевой комиссии."
          },
          "amountUsd": {
            "type": "string",
            "nullable": true,
            "example": "50.00",
            "description": "1.4.0: оценка суммы в USD."
          },
          "rateUsd": {
            "type": "string",
            "nullable": true,
            "example": "1.00",
            "description": "1.4.0: курс актива к USD."
          },
          "commission": {
            "type": "string",
            "nullable": true,
            "description": "1.4.0: комиссия обменника (ledger), если учёт включён."
          },
          "networkFee": {
            "type": "string",
            "nullable": true,
            "description": "1.4.0: фактическая сетевая комиссия исходящей tx (нативная монета сети)."
          }
        },
        "required": [
          "uuid",
          "orderId",
          "status",
          "assetCode",
          "destinationAddress",
          "destinationMemo",
          "amount",
          "requiresApproval",
          "txHash",
          "confirmations",
          "requiredConfirmations",
          "networkStatus",
          "explorerTxUrl",
          "failReason",
          "approvedAt",
          "broadcastedAt",
          "confirmedAt",
          "createdAt",
          "updatedAt",
          "network",
          "isFinal",
          "priority",
          "amountUsd",
          "rateUsd",
          "commission",
          "networkFee"
        ]
      },
      "BulkCreatePublicPayoutsDto": {
        "type": "object",
        "properties": {
          "items": {
            "description": "Список выплат (макс. 100).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreatePublicPayoutDto"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "PublicBulkPayoutRowDto": {
        "type": "object",
        "properties": {
          "index": {
            "type": "number",
            "example": 0
          },
          "ok": {
            "type": "boolean",
            "example": true
          },
          "orderId": {
            "type": "string",
            "example": "payout_77"
          },
          "payout": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicPayoutResponseDto"
              }
            ]
          },
          "error": {
            "type": "object",
            "nullable": true,
            "example": {
              "code": "INVALID_ADDRESS",
              "message": "Invalid address for TRON"
            }
          }
        },
        "required": [
          "index",
          "ok",
          "orderId",
          "payout",
          "error"
        ]
      },
      "PublicBulkPayoutsResponseDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicBulkPayoutRowDto"
            }
          },
          "summary": {
            "type": "object",
            "example": {
              "total": 3,
              "succeeded": 2,
              "failed": 1
            }
          }
        },
        "required": [
          "items",
          "summary"
        ]
      },
      "PayoutCalculateDto": {
        "type": "object",
        "properties": {
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "destinationAddress": {
            "type": "string",
            "example": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
            "description": "Адрес получателя (уточняет оценку сетевой комиссии)."
          },
          "amount": {
            "type": "string",
            "example": "50.00"
          },
          "priority": {
            "type": "string",
            "enum": [
              "economy",
              "recommended",
              "high"
            ],
            "default": "recommended"
          },
          "isSubtract": {
            "type": "boolean",
            "default": false,
            "description": "true — комиссии вычитаются из `amount` (получатель получает меньше, списывается ровно amount); false — получатель получает ровно amount, комиссии сверху."
          }
        },
        "required": [
          "assetCode",
          "amount"
        ]
      },
      "PublicPayoutCalculationDto": {
        "type": "object",
        "properties": {
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "network": {
            "type": "string",
            "example": "TRON"
          },
          "priority": {
            "type": "string",
            "enum": [
              "economy",
              "recommended",
              "high"
            ]
          },
          "isSubtract": {
            "type": "boolean"
          },
          "amount": {
            "type": "string",
            "example": "100.000000"
          },
          "serviceFee": {
            "type": "object",
            "example": {
              "percent": "0.5",
              "amount": "0.500000",
              "amountUsd": "0.50"
            }
          },
          "networkFee": {
            "type": "object",
            "example": {
              "amount": "13.5",
              "assetCode": "TRX",
              "amountUsd": "1.62",
              "estimatedConfirmationSeconds": 60,
              "error": null
            }
          },
          "recipientReceives": {
            "type": "string",
            "example": "100.000000"
          },
          "totalDebit": {
            "type": "string",
            "example": "100.500000"
          },
          "amountUsd": {
            "type": "string",
            "nullable": true
          },
          "rateUsd": {
            "type": "string",
            "nullable": true
          },
          "minPayout": {
            "type": "string",
            "example": "1.000000"
          },
          "checks": {
            "type": "object",
            "example": {
              "payoutEnabled": true,
              "aboveMinimum": true,
              "withinLimits": {
                "ok": true,
                "code": null,
                "message": null
              },
              "sufficientBalance": true,
              "availableBalance": "1530.500000"
            }
          }
        },
        "required": [
          "assetCode",
          "network",
          "priority",
          "isSubtract",
          "amount",
          "serviceFee",
          "networkFee",
          "recipientReceives",
          "totalDebit",
          "amountUsd",
          "rateUsd",
          "minPayout",
          "checks"
        ]
      },
      "PayoutFeeEstimateDto": {
        "type": "object",
        "properties": {
          "assetCode": {
            "type": "string"
          },
          "destinationAddress": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "priority": {
            "type": "string",
            "enum": [
              "economy",
              "recommended",
              "high"
            ],
            "default": "recommended",
            "description": "1.4.0: приоритет сетевой комиссии."
          }
        },
        "required": [
          "assetCode",
          "destinationAddress",
          "amount"
        ]
      },
      "PublicPayoutFeeEstimateResponseDto": {
        "type": "object",
        "properties": {
          "networkFee": {
            "type": "string",
            "example": "1.1",
            "description": "Оценка комиссии сети в native-единицах (string)."
          },
          "resource": {
            "type": "object",
            "description": "Доп. ресурс: energy (TRON) / gas (EVM) / bytes (UTXO) / none.",
            "example": {
              "kind": "energy",
              "amount": 65000
            }
          },
          "estimatedConfirmationSeconds": {
            "type": "number",
            "example": 60,
            "description": "Грубая оценка времени подтверждения (сек)."
          },
          "priority": {
            "type": "string",
            "enum": [
              "economy",
              "recommended",
              "high"
            ],
            "example": "recommended",
            "description": "1.4.0: приоритет, для которого сделана оценка."
          }
        },
        "required": [
          "networkFee",
          "resource",
          "estimatedConfirmationSeconds",
          "priority"
        ]
      },
      "PublicPayoutListResponseDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicPayoutResponseDto"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PublicListMetaDto"
          }
        },
        "required": [
          "items",
          "meta"
        ]
      },
      "CreateApprovalPolicyDto": {
        "type": "object",
        "properties": {
          "amountThreshold": {
            "type": "string",
            "example": "1000.0",
            "description": "Порог суммы (в native единицах асета). При сумме ≥ порога требуется одобрение."
          },
          "quorumRequired": {
            "type": "number",
            "example": 2,
            "minimum": 1,
            "description": "Кворум M — сколько одобрений нужно собрать (m-of-n)."
          },
          "approversMinCount": {
            "type": "number",
            "example": 3,
            "minimum": 1,
            "description": "Минимальный пул approvers N — сколько разных операторов минимум. Должно быть ≥ кворума M."
          },
          "siteUuid": {
            "type": "string",
            "description": "Site UUID для скоупа политики. Пусто = на все сайты.",
            "nullable": true
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20",
            "description": "Asset.code для скоупа политики. Пусто = на все валюты.",
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "description": "Включена ли политика (default true). false = временно отключить без удаления."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Описание / заметка."
          }
        },
        "required": [
          "amountThreshold",
          "quorumRequired",
          "approversMinCount"
        ]
      },
      "UpdateApprovalPolicyDto": {
        "type": "object",
        "properties": {
          "amountThreshold": {
            "type": "string",
            "example": "1000.0",
            "description": "Порог суммы (в native единицах асета). При сумме ≥ порога требуется одобрение."
          },
          "quorumRequired": {
            "type": "number",
            "example": 2,
            "minimum": 1,
            "description": "Кворум M — сколько одобрений нужно собрать (m-of-n)."
          },
          "approversMinCount": {
            "type": "number",
            "example": 3,
            "minimum": 1,
            "description": "Минимальный пул approvers N — сколько разных операторов минимум. Должно быть ≥ кворума M."
          },
          "siteUuid": {
            "type": "string",
            "description": "Site UUID для скоупа политики. Пусто = на все сайты.",
            "nullable": true
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20",
            "description": "Asset.code для скоупа политики. Пусто = на все валюты.",
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "description": "Включена ли политика (default true). false = временно отключить без удаления."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Описание / заметка."
          }
        }
      },
      "CreateAdminPayoutDto": {
        "type": "object",
        "properties": {
          "siteUuid": {
            "type": "string",
            "description": "Site UUID"
          },
          "orderId": {
            "type": "string",
            "description": "Опционально: комментарий / номер заявки (например для бухгалтерии или связи с CMS обменника). Если не указан — генерируется автоматически в формате `manual-<timestamp>-<short-uuid>`. Если указан — проверяется уникальность в рамках сайта (по deposit и payout)."
          },
          "assetCode": {
            "type": "string",
            "description": "Asset code"
          },
          "destinationAddress": {
            "type": "string",
            "description": "Destination address"
          },
          "destinationMemo": {
            "type": "string",
            "description": "Memo / comment / tag (для TON / XRP / XLM)"
          },
          "amount": {
            "type": "string",
            "description": "Amount as decimal string",
            "example": "5.0"
          },
          "fromWalletUuid": {
            "type": "string",
            "description": "Source hot wallet UUID. Если не указан — broadcast выберет default hot."
          },
          "sweepAll": {
            "type": "boolean",
            "description": "Sweep-mode: переводим весь balance source wallet'a на destination. Для native сети (BTC/ETH/BNB/TRX) gas вычитается из value (adapter использует `sweepMode: true`). Для токенов (USDT etc) отправляется весь token balance, gas платится из native balance."
          }
        },
        "required": [
          "siteUuid",
          "assetCode",
          "destinationAddress",
          "amount"
        ]
      },
      "BulkCreatePayoutsDto": {
        "type": "object",
        "properties": {
          "items": {
            "description": "Список выплат (макс. 500).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateAdminPayoutDto"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "ApprovePayoutDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "RejectPayoutDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "reason"
        ]
      },
      "CreateDepositRefundDto": {
        "type": "object",
        "properties": {
          "toAddress": {
            "type": "string",
            "example": "TXYZ…",
            "description": "Адрес получателя возврата. По умолчанию — адрес отправителя входящей транзакции (transaction.fromAddress).",
            "maxLength": 255
          },
          "toMemo": {
            "type": "string",
            "description": "Memo/tag получателя (memo-based сети: TON, XRP, XLM…).",
            "maxLength": 255
          },
          "amount": {
            "type": "string",
            "example": "95.5",
            "description": "Сумма возврата (string decimal). По умолчанию — вся полученная сумма. Не больше полученной; сетевая комиссия удерживается с hot-кошелька по правилам выплат."
          },
          "reason": {
            "type": "string",
            "example": "client cancelled the order",
            "maxLength": 500,
            "description": "Причина возврата (в аудит)."
          }
        }
      },
      "DepositRefundDepositRefDto": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "orderId": {
            "type": "string",
            "example": "ORD-1001"
          },
          "status": {
            "type": "string",
            "example": "refund_process"
          }
        },
        "required": [
          "uuid",
          "orderId",
          "status"
        ]
      },
      "DepositRefundResponseDto": {
        "type": "object",
        "properties": {
          "payout": {
            "description": "Созданная выплата-возврат (source=refund).",
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicPayoutResponseDto"
              }
            ]
          },
          "deposit": {
            "$ref": "#/components/schemas/DepositRefundDepositRefDto"
          }
        },
        "required": [
          "payout",
          "deposit"
        ]
      },
      "SetKillSwitchDto": {
        "type": "object",
        "properties": {}
      },
      "KeystoreUnlockDto": {
        "type": "object",
        "properties": {}
      },
      "SetAdminIpAllowlistDto": {
        "type": "object",
        "properties": {}
      },
      "UpsertWhitelistPolicyDto": {
        "type": "object",
        "properties": {}
      },
      "AddWhitelistEntryDto": {
        "type": "object",
        "properties": {}
      },
      "UpsertVelocityPolicyDto": {
        "type": "object",
        "properties": {}
      },
      "CreateRebalancePolicyDto": {
        "type": "object",
        "properties": {}
      },
      "CreateAuditSinkDto": {
        "type": "object",
        "properties": {}
      },
      "PublicBalanceRowDto": {
        "type": "object",
        "properties": {
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "symbol": {
            "type": "string",
            "example": "USDT"
          },
          "network": {
            "type": "string",
            "example": "TRON"
          },
          "decimals": {
            "type": "number",
            "example": 6
          },
          "total": {
            "type": "string",
            "example": "1530.500000",
            "description": "On-chain баланс hot-кошельков."
          },
          "reserved": {
            "type": "string",
            "example": "30.000000",
            "description": "Принятые, ещё не отправленные выплаты."
          },
          "available": {
            "type": "string",
            "example": "1500.500000",
            "description": "total − reserved: чем можно оплатить новую выплату."
          },
          "pendingOutgoing": {
            "type": "string",
            "example": "0.000000",
            "description": "Отправлено в сеть, ждёт подтверждений."
          },
          "pendingIncoming": {
            "type": "string",
            "example": "250.000000",
            "description": "Депозиты с замеченной tx, ждут подтверждений."
          },
          "availableUsd": {
            "type": "string",
            "nullable": true,
            "example": "1500.50"
          },
          "rateUsd": {
            "type": "string",
            "nullable": true,
            "example": "1.00"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "assetCode",
          "symbol",
          "network",
          "decimals",
          "total",
          "reserved",
          "available",
          "pendingOutgoing",
          "pendingIncoming",
          "availableUsd",
          "rateUsd",
          "updatedAt"
        ]
      },
      "PublicQueueItemDto": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "deposit",
              "payout"
            ]
          },
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "orderId": {
            "type": "string"
          },
          "assetCode": {
            "type": "string",
            "example": "USDT_TRC20"
          },
          "network": {
            "type": "string",
            "example": "TRON"
          },
          "status": {
            "type": "string",
            "example": "confirm_check"
          },
          "amount": {
            "type": "string",
            "example": "100.5"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "kind",
          "uuid",
          "orderId",
          "assetCode",
          "network",
          "status",
          "amount",
          "createdAt",
          "updatedAt"
        ]
      },
      "PublicQueueResponseDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicQueueItemDto"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "SandboxPayDepositDto": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "example": "100",
            "description": "Сумма «входящей» транзакции. По умолчанию — ожидаемая сумма депозита (для депозитов без суммы обязательна)."
          },
          "fromAddress": {
            "type": "string",
            "example": "TSandboxSender",
            "description": "Адрес отправителя в эмулируемой tx."
          },
          "confirmations": {
            "type": "number",
            "example": 0,
            "description": "Число подтверждений на момент детекции. По умолчанию — порог финализации (депозит финализируется сразу). Меньше порога — депозит останется в process (webhook deposit.tx_detected), финализация придёт через ~30 с."
          }
        }
      },
      "SandboxPayDepositResponseDto": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "txhash": {
            "type": "string",
            "example": "sandbox:…:1757…",
            "description": "Синтетический txhash (в сети не существует)."
          },
          "amount": {
            "type": "string",
            "example": "100"
          },
          "confirmations": {
            "type": "number",
            "example": 19
          },
          "requiredConfirmations": {
            "type": "number",
            "example": 19
          }
        },
        "required": [
          "uuid",
          "txhash",
          "amount",
          "confirmations",
          "requiredConfirmations"
        ]
      },
      "SandboxCompletePayoutDto": {
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string",
            "enum": [
              "confirmed",
              "failed"
            ],
            "example": "confirmed",
            "description": "Исход эмулируемой выплаты."
          },
          "reason": {
            "type": "string",
            "example": "insufficient energy",
            "description": "Причина (для outcome=failed)."
          }
        },
        "required": [
          "outcome"
        ]
      },
      "SandboxCompletePayoutResponseDto": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "example": "confirmed"
          },
          "txhash": {
            "type": "string",
            "nullable": true,
            "example": "sandbox:…"
          }
        },
        "required": [
          "uuid",
          "status",
          "txhash"
        ]
      },
      "GenerateWalletDto": {
        "type": "object",
        "properties": {
          "network": {
            "type": "string",
            "enum": [
              "TRON",
              "TON",
              "ETHEREUM",
              "BSC",
              "POLYGON",
              "AVALANCHE",
              "BITCOIN",
              "LITECOIN",
              "DOGECOIN",
              "XRP",
              "SOLANA",
              "ZCASH",
              "MONERO",
              "COSMOS",
              "POLKADOT"
            ]
          },
          "label": {
            "type": "string",
            "description": "Заметка для каталога (для каких целей сгенерирован)."
          }
        },
        "required": [
          "network"
        ]
      },
      "SetApiKeyDto": {
        "type": "object",
        "properties": {}
      },
      "SetSiteAccessDto": {
        "type": "object",
        "properties": {}
      },
      "CreateUserDto": {
        "type": "object",
        "properties": {}
      },
      "UpdateUserDto": {
        "type": "object",
        "properties": {}
      },
      "SendCredentialsDto": {
        "type": "object",
        "properties": {}
      },
      "SetAccessDto": {
        "type": "object",
        "properties": {}
      },
      "DryRunDto": {
        "type": "object",
        "properties": {}
      },
      "ActivateLicenseDto": {
        "type": "object",
        "properties": {}
      },
      "SetSettingDto": {
        "type": "object",
        "properties": {
          "value": {
            "type": "object",
            "description": "Сырое значение настройки (bool, number, string, enum-value)."
          }
        },
        "required": [
          "value"
        ]
      },
      "SetRateSourceDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Опрашивать ли источник."
          },
          "priority": {
            "type": "number",
            "description": "Приоритет (1 — самый высокий).",
            "minimum": 1,
            "maximum": 999
          }
        }
      },
      "SetAggregationDto": {
        "type": "object",
        "properties": {
          "strategy": {
            "type": "string",
            "description": "Стратегия свёртки источников в canonical-курс.",
            "enum": [
              "median",
              "average",
              "priority"
            ]
          },
          "maxDeviationPct": {
            "type": "number",
            "description": "Порог отсева выбросов, % отклонения от медианы (0 — выключить отсев).",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "SetAssetSourceDto": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "Источник курса для валюты: «aggregated» — общая стратегия, либо конкретная биржа.",
            "enum": [
              "aggregated",
              "coingecko",
              "binance",
              "bybit"
            ]
          }
        },
        "required": [
          "source"
        ]
      },
      "CreateEmailProviderDto": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "smtp",
              "resend"
            ]
          },
          "fromEmail": {
            "type": "string"
          },
          "fromName": {
            "type": "string"
          },
          "replyTo": {
            "type": "string"
          },
          "smtpHost": {
            "type": "string"
          },
          "smtpPort": {
            "type": "number"
          },
          "smtpSecure": {
            "type": "boolean"
          },
          "smtpUser": {
            "type": "string"
          },
          "secret": {
            "type": "string",
            "description": "Обязательно для Resend, опционально для SMTP (если сервер без auth)."
          },
          "activate": {
            "type": "boolean",
            "default": true
          }
        },
        "required": [
          "provider",
          "fromEmail"
        ]
      },
      "UpdateEmailProviderDto": {
        "type": "object",
        "properties": {
          "fromEmail": {
            "type": "string"
          },
          "fromName": {
            "type": "string"
          },
          "replyTo": {
            "type": "string"
          },
          "smtpHost": {
            "type": "string"
          },
          "smtpPort": {
            "type": "number"
          },
          "smtpSecure": {
            "type": "boolean"
          },
          "smtpUser": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          }
        }
      },
      "SendTestEmailDto": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          }
        },
        "required": [
          "to"
        ]
      },
      "UpsertSubscriptionDto": {
        "type": "object",
        "properties": {
          "eventCode": {
            "type": "string"
          },
          "channel": {
            "type": "string",
            "enum": [
              "telegram",
              "email"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "recipients": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "customSubject": {
            "type": "string"
          },
          "siteUuid": {
            "type": "object",
            "description": "UUID сайта (для per-site override). null/undefined = глобальная."
          }
        },
        "required": [
          "eventCode",
          "channel",
          "enabled",
          "recipients"
        ]
      },
      "ConnectTelegramBotDto": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Bot token из @BotFather (формат 123456:ABC-DEF...)."
          }
        },
        "required": [
          "token"
        ]
      },
      "AttachCandidateDto": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "operator",
              "manager"
            ],
            "description": "Опц. роль получателя."
          },
          "customLabel": {
            "type": "string",
            "description": "Свой label вместо auto-name из Telegram."
          }
        }
      },
      "SetChannelStateDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "BulkToggleSubscriptionsDto": {
        "type": "object",
        "properties": {
          "channels": {
            "description": "Каналы для применения. По умолчанию оба.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "siteUuid": {
            "type": "object",
            "description": "UUID сайта или null для глобальных подписок."
          }
        },
        "required": [
          "channels",
          "enabled"
        ]
      },
      "CreateRecipientsDto": {
        "type": "object",
        "properties": {
          "values": {
            "type": "object",
            "description": "Список получателей. Можно строкой через запятую или массивом.",
            "example": "admin@example.com, ops@example.com"
          },
          "role": {
            "type": "object",
            "description": "Общая роль для всех созданных записей."
          }
        },
        "required": [
          "values"
        ]
      },
      "UpdateRecipientDto": {
        "type": "object",
        "properties": {
          "label": {
            "type": "object"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "operator",
              "manager"
            ]
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "MarkNotificationsReadDto": {
        "type": "object",
        "properties": {
          "uuids": {
            "description": "UUID уведомлений, помечаемых прочитанными",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "uuids"
        ]
      },
      "CreateAutoRuleDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": true
          },
          "triggerType": {
            "type": "string",
            "enum": [
              "on_deposit",
              "on_threshold",
              "scheduled"
            ],
            "description": "Тип триггера авто-конвертации."
          },
          "sourceAssetCode": {
            "type": "string",
            "description": "Код актива-источника. Пусто = любой волатильный актив сети."
          },
          "targetAssetCode": {
            "type": "string",
            "description": "Целевой актив (стейбл)."
          },
          "network": {
            "type": "string",
            "description": "Сеть (NetworkCode). Пусто = все поддерживаемые сети."
          },
          "thresholdAmount": {
            "type": "string",
            "description": "Порог (для on_threshold): конвертируется излишек над порогом."
          },
          "minAmount": {
            "type": "string",
            "description": "Минимальная сумма конвертации (защита от пыли)."
          },
          "maxSlippageBps": {
            "type": "number"
          },
          "providerCode": {
            "type": "string",
            "description": "Фиксированный провайдер (для strategy=fixed)."
          },
          "providerStrategy": {
            "type": "string",
            "enum": [
              "auto_best",
              "fixed",
              "priority"
            ],
            "default": "auto_best"
          },
          "providerPriority": {
            "description": "Приоритетный список провайдеров (strategy=priority).",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "amountMode": {
            "type": "string",
            "enum": [
              "full_balance",
              "excess_over_threshold"
            ],
            "default": "full_balance"
          },
          "minUsd": {
            "type": "string",
            "description": "Мин. стоимость источника в USD для срабатывания."
          },
          "maxUsd": {
            "type": "string",
            "description": "Макс. стоимость источника в USD для срабатывания."
          },
          "delaySeconds": {
            "type": "number",
            "description": "Задержка исполнения после получения средств, сек. 0 = глобальный дефолт."
          },
          "cooldownSeconds": {
            "type": "number",
            "description": "Per-rule cooldown между прогонами, сек. Пусто = глобальный (120)."
          },
          "maxRunsPerDay": {
            "type": "number",
            "description": "Лимит: не больше N конвертаций правила в сутки."
          },
          "maxVolumeUsdPerDay": {
            "type": "string",
            "description": "Лимит объёма USD в сутки."
          },
          "minRateUsd": {
            "type": "string",
            "description": "Конвертировать только если цена 1 ед. источника ≥ (USD)."
          },
          "maxRateUsd": {
            "type": "string",
            "description": "Конвертировать только если цена 1 ед. источника ≤ (USD)."
          },
          "maxGasUsd": {
            "type": "string",
            "description": "Не свопать, если оценочный газ дороже (USD)."
          },
          "quietHoursStart": {
            "type": "number",
            "description": "Начало тихих часов UTC (0-23); вне окна — не конвертировать."
          },
          "quietHoursEnd": {
            "type": "number",
            "description": "Конец тихих часов UTC (0-23)."
          },
          "requireApproval": {
            "type": "boolean",
            "description": "Форсить four-eyes для конвертаций этого правила."
          },
          "oracleDeviationBpsOverride": {
            "type": "number",
            "description": "Ужесточить oracle-deviation для DEX, bps (только ниже глобального)."
          }
        },
        "required": [
          "triggerType",
          "targetAssetCode"
        ]
      },
      "UpdateAutoRuleDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "triggerType": {
            "type": "string",
            "enum": [
              "on_deposit",
              "on_threshold",
              "scheduled"
            ]
          },
          "sourceAssetCode": {
            "type": "object"
          },
          "targetAssetCode": {
            "type": "string"
          },
          "network": {
            "type": "object"
          },
          "thresholdAmount": {
            "type": "object"
          },
          "minAmount": {
            "type": "object"
          },
          "maxSlippageBps": {
            "type": "object"
          },
          "providerCode": {
            "type": "object"
          },
          "providerStrategy": {
            "type": "string",
            "enum": [
              "auto_best",
              "fixed",
              "priority"
            ]
          },
          "providerPriority": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "amountMode": {
            "type": "string",
            "enum": [
              "full_balance",
              "excess_over_threshold"
            ]
          },
          "minUsd": {
            "type": "object"
          },
          "maxUsd": {
            "type": "object"
          },
          "delaySeconds": {
            "type": "number"
          },
          "cooldownSeconds": {
            "type": "object"
          },
          "maxRunsPerDay": {
            "type": "object"
          },
          "maxVolumeUsdPerDay": {
            "type": "object"
          },
          "minRateUsd": {
            "type": "object"
          },
          "maxRateUsd": {
            "type": "object"
          },
          "maxGasUsd": {
            "type": "object"
          },
          "quietHoursStart": {
            "type": "object"
          },
          "quietHoursEnd": {
            "type": "object"
          },
          "requireApproval": {
            "type": "boolean"
          },
          "oracleDeviationBpsOverride": {
            "type": "object"
          }
        }
      },
      "CreateLimitOrderDto": {
        "type": "object",
        "properties": {
          "sourceAssetCode": {
            "type": "string",
            "description": "Код исходного актива (что продаём/конвертируем)."
          },
          "targetAssetCode": {
            "type": "string",
            "description": "Код целевого актива (во что)."
          },
          "network": {
            "type": "string",
            "description": "Сеть исходного актива (TRON/ETHEREUM/…)."
          },
          "sourceAmount": {
            "type": "string",
            "description": "Сумма исходного актива (строка-десятичная > 0)."
          },
          "side": {
            "type": "string",
            "enum": [
              "sell_when_ge",
              "buy_when_le"
            ],
            "description": "sell_when_ge — сработать когда курс ≥ цели; buy_when_le — когда ≤."
          },
          "targetRate": {
            "type": "string",
            "description": "Целевой курс пары src→tgt (target за единицу source), строка > 0."
          },
          "providerCode": {
            "type": "string",
            "description": "Код провайдера (пусто = авто-выбор лучшего при срабатывании)."
          },
          "maxSlippageBps": {
            "type": "number",
            "description": "Максимальное проскальзывание, bps (пусто = из настроек)."
          },
          "fromWalletUuid": {
            "type": "string",
            "description": "UUID source system-кошелька (пусто = авто по сети)."
          },
          "expiresAt": {
            "type": "string",
            "description": "Срок GTC (ISO). Пусто = из настроек / бессрочно."
          }
        },
        "required": [
          "sourceAssetCode",
          "targetAssetCode",
          "network",
          "sourceAmount",
          "side",
          "targetRate"
        ]
      },
      "CreateTreasuryPolicyDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "cap",
              "floor"
            ]
          },
          "assetCode": {
            "type": "string",
            "description": "Наблюдаемый актив (cap=волатильный, floor=стейбл-цель)."
          },
          "targetAssetCode": {
            "type": "string",
            "description": "cap=стейбл-цель; floor=волатильный источник продажи."
          },
          "boundUsd": {
            "type": "string",
            "description": "Граница USD (cap=потолок, floor=пол)."
          },
          "network": {
            "type": "string"
          },
          "minActionUsd": {
            "type": "string"
          },
          "maxActionUsd": {
            "type": "string"
          },
          "providerStrategy": {
            "type": "string",
            "enum": [
              "auto_best",
              "fixed"
            ]
          },
          "providerCode": {
            "type": "string"
          },
          "cooldownSeconds": {
            "type": "number",
            "minimum": 60,
            "description": "Кулдаун между действиями политики, сек (минимум 60)."
          },
          "maxRunsPerDay": {
            "type": "number"
          },
          "requireApproval": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "mode",
          "assetCode",
          "targetAssetCode",
          "boundUsd"
        ]
      },
      "UpdateTreasuryPolicyDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "cap",
              "floor"
            ]
          },
          "assetCode": {
            "type": "string"
          },
          "targetAssetCode": {
            "type": "string"
          },
          "boundUsd": {
            "type": "string"
          },
          "network": {
            "type": "string"
          },
          "minActionUsd": {
            "type": "string"
          },
          "maxActionUsd": {
            "type": "string"
          },
          "providerStrategy": {
            "type": "string",
            "enum": [
              "auto_best",
              "fixed"
            ]
          },
          "providerCode": {
            "type": "string"
          },
          "cooldownSeconds": {
            "type": "number",
            "minimum": 60,
            "description": "Кулдаун между действиями политики, сек (минимум 60)."
          },
          "maxRunsPerDay": {
            "type": "number"
          },
          "requireApproval": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "CreateConversionProviderDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Отображаемое имя инстанса (видит оператор)."
          },
          "kind": {
            "type": "string",
            "enum": [
              "dex",
              "instant_swap",
              "cex"
            ]
          },
          "backend": {
            "type": "string",
            "description": "Backend-id драйвера из каталога (0x / changenow / …)."
          },
          "enabled": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "priority": {
            "type": "number"
          },
          "settings": {
            "type": "object",
            "description": "Несекретные настройки (settingsJson)."
          },
          "secrets": {
            "type": "object",
            "description": "Секреты (api_key/api_secret/…) → значение. Сохраняются в vault."
          }
        },
        "required": [
          "name",
          "kind",
          "backend"
        ]
      },
      "UpdateConversionProviderDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "priority": {
            "type": "number"
          },
          "settings": {
            "type": "object"
          },
          "secrets": {
            "type": "object"
          }
        }
      },
      "QuoteConversionDto": {
        "type": "object",
        "properties": {
          "sourceAssetCode": {
            "type": "string",
            "example": "ETH",
            "description": "Код актива-источника."
          },
          "targetAssetCode": {
            "type": "string",
            "example": "USDT_ERC20",
            "description": "Код целевого актива (обычно стейбл)."
          },
          "network": {
            "type": "string",
            "example": "ETHEREUM",
            "description": "Сеть исполнения (NetworkCode)."
          },
          "amountIn": {
            "type": "string",
            "example": "1.5",
            "description": "Сумма к конвертации (string)."
          },
          "providerCode": {
            "type": "string",
            "description": "Код провайдера (по умолчанию — активный по умолчанию)."
          },
          "maxSlippageBps": {
            "type": "number",
            "description": "Допустимое проскальзывание в bps (по умолчанию — из настроек)."
          },
          "fromWalletUuid": {
            "type": "string",
            "description": "UUID system-кошелька-источника (по умолчанию — первый активный hot в сети)."
          }
        },
        "required": [
          "sourceAssetCode",
          "targetAssetCode",
          "network",
          "amountIn"
        ]
      },
      "CreateConversionDto": {
        "type": "object",
        "properties": {
          "sourceAssetCode": {
            "type": "string",
            "example": "ETH",
            "description": "Код актива-источника."
          },
          "targetAssetCode": {
            "type": "string",
            "example": "USDT_ERC20",
            "description": "Код целевого актива (обычно стейбл)."
          },
          "network": {
            "type": "string",
            "example": "ETHEREUM",
            "description": "Сеть исполнения (NetworkCode)."
          },
          "amountIn": {
            "type": "string",
            "example": "1.5",
            "description": "Сумма к конвертации (string)."
          },
          "providerCode": {
            "type": "string",
            "description": "Код провайдера (по умолчанию — активный по умолчанию)."
          },
          "maxSlippageBps": {
            "type": "number",
            "description": "Допустимое проскальзывание в bps (по умолчанию — из настроек)."
          },
          "fromWalletUuid": {
            "type": "string",
            "description": "UUID system-кошелька-источника (по умолчанию — первый активный hot в сети)."
          },
          "idempotencyKey": {
            "type": "string",
            "description": "Idempotency-ключ (повторный create с тем же ключом вернёт ту же заявку)."
          }
        },
        "required": [
          "sourceAssetCode",
          "targetAssetCode",
          "network",
          "amountIn"
        ]
      },
      "QuotePublicConversionDto": {
        "type": "object",
        "properties": {
          "sourceAssetCode": {
            "type": "string",
            "example": "ETH",
            "description": "Код актива-источника."
          },
          "targetAssetCode": {
            "type": "string",
            "example": "USDT_ERC20",
            "description": "Код целевого актива (стейбл)."
          },
          "network": {
            "type": "string",
            "enum": [
              "TRON",
              "TON",
              "ETHEREUM",
              "BSC",
              "POLYGON",
              "AVALANCHE",
              "BITCOIN",
              "LITECOIN",
              "DOGECOIN",
              "XRP",
              "SOLANA",
              "ZCASH",
              "MONERO",
              "COSMOS",
              "POLKADOT"
            ],
            "example": "ETHEREUM",
            "description": "Сеть исполнения."
          },
          "amountIn": {
            "type": "string",
            "example": "1.5",
            "description": "Сумма к конвертации (string)."
          },
          "maxSlippageBps": {
            "type": "number",
            "description": "Допустимое проскальзывание в bps (по умолчанию — из настроек)."
          }
        },
        "required": [
          "sourceAssetCode",
          "targetAssetCode",
          "network",
          "amountIn"
        ]
      },
      "PublicQuoteResponseDto": {
        "type": "object",
        "properties": {
          "sourceAssetCode": {
            "type": "string"
          },
          "targetAssetCode": {
            "type": "string"
          },
          "network": {
            "type": "string"
          },
          "amountIn": {
            "type": "string"
          },
          "amountOut": {
            "type": "string"
          },
          "minAmountOut": {
            "type": "string"
          },
          "rate": {
            "type": "string"
          },
          "slippageBps": {
            "type": "number"
          },
          "ttlSeconds": {
            "type": "number"
          },
          "executable": {
            "type": "boolean",
            "description": "false = preview без on-chain исполнения (нет DEX-backend)."
          }
        },
        "required": [
          "sourceAssetCode",
          "targetAssetCode",
          "network",
          "amountIn",
          "amountOut",
          "minAmountOut",
          "rate",
          "slippageBps",
          "ttlSeconds",
          "executable"
        ]
      },
      "CreatePublicConversionDto": {
        "type": "object",
        "properties": {
          "sourceAssetCode": {
            "type": "string",
            "example": "ETH",
            "description": "Код актива-источника."
          },
          "targetAssetCode": {
            "type": "string",
            "example": "USDT_ERC20",
            "description": "Код целевого актива (стейбл)."
          },
          "network": {
            "type": "string",
            "enum": [
              "TRON",
              "TON",
              "ETHEREUM",
              "BSC",
              "POLYGON",
              "AVALANCHE",
              "BITCOIN",
              "LITECOIN",
              "DOGECOIN",
              "XRP",
              "SOLANA",
              "ZCASH",
              "MONERO",
              "COSMOS",
              "POLKADOT"
            ],
            "example": "ETHEREUM",
            "description": "Сеть исполнения."
          },
          "amountIn": {
            "type": "string",
            "example": "1.5",
            "description": "Сумма к конвертации (string)."
          },
          "maxSlippageBps": {
            "type": "number",
            "description": "Допустимое проскальзывание в bps (по умолчанию — из настроек)."
          }
        },
        "required": [
          "sourceAssetCode",
          "targetAssetCode",
          "network",
          "amountIn"
        ]
      },
      "PublicConversionResponseDto": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "example": "queued"
          },
          "sourceAssetCode": {
            "type": "string"
          },
          "targetAssetCode": {
            "type": "string"
          },
          "network": {
            "type": "string"
          },
          "sourceAmount": {
            "type": "string"
          },
          "quotedAmountOut": {
            "type": "string"
          },
          "executedAmountOut": {
            "type": "object",
            "nullable": true
          },
          "quotedRate": {
            "type": "string"
          },
          "executedRate": {
            "type": "object",
            "nullable": true
          },
          "minAmountOut": {
            "type": "string"
          },
          "providerKind": {
            "type": "string",
            "example": "dex"
          },
          "failReason": {
            "type": "object",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "settledAt": {
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "uuid",
          "status",
          "sourceAssetCode",
          "targetAssetCode",
          "network",
          "sourceAmount",
          "quotedAmountOut",
          "executedAmountOut",
          "quotedRate",
          "executedRate",
          "minAmountOut",
          "providerKind",
          "failReason",
          "createdAt",
          "settledAt"
        ]
      }
    }
  },
  "security": [
    {
      "X-Api-Id": [],
      "X-Api-Key": [],
      "hmac": [],
      "X-Timestamp": []
    }
  ]
}
