MeРазрешённые сегменты

Разрешённые сегменты

Какие значения сегментов derivation path разрешены пользователю для action'а. UNION по всем allow-политикам юзера в Vault: из senderPattern селекторов require-rules извлекаются разрешённые pathId; политика без senderPattern разрешает всё ("*"). Block-политики игнорируются — они сработают на самом submit'е. Используется UI формы создания адреса, чтобы показывать только доступные варианты.

curl -X GET "https://policy-engine-rest.ezig.workers.dev/api/v1/me/allowed-segments?vaultId=example_string&action=create_address" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "action": "create_address",
  "segments": {
    "network": [
      195
    ],
    "app_id": [
      0
    ],
    "asset": "*"
  }
}
GET
/api/v1/me/allowed-segments
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

better-auth session token. Мобилка/сервисы. Веб использует cookie.

better-auth session token. Мобилка/сервисы. Веб использует cookie.
API Key (cookie: better-auth.session_token)
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. better-auth session token. Мобилка/сервисы. Веб использует cookie.

path
parameterstring
Required

API Key for authentication. Provide your API key in the cookie.

Query Parameters

actionstring
Required
Example:
create_address

Responses

actionstring
Required
segmentsobject
Required

code сегмента → разрешённые pathId или "*" (без ограничений). Пустой объект — нет allow-политик