Stuck Balances
List every stuck balance on a chain, per token
/stuck-balancesMerges the three places funds can get stuck into one list per token, with the amount from each
source: utxo (stuck UTXOs, as GET /stuck-utxo-balance), bridge (refunds of failed bridges,
from a private send bridge or a transfer address, as GET /stuck-bridge-balance) and vault (funds a receive address could not shield,
one source per address). If any source cannot be read, the call fails instead of returning a
partial list; retry, or read the sources one by one with GET /stuck-utxo-balance,
GET /stuck-bridge-balance and GET /receive-vault-account. Recover a source with
POST /recover-stuck-balance.
Read-only — requires an active session. Pass sessionId and nonce as query parameters
and include x-hinkal-request-signature: secp256k1_sign(SHA256("GET /stuck-balances\n" + queryString))
in the headers.
Query parameters
| Name | Type | Description |
|---|---|---|
sessionIdrequired | string (uuid) | Session identifier UUID from POST /create-session |
noncerequired | string (uuid) | Per-request UUID. Echoed back in the response. |
chainIdrequired | string | Chain ID to check |
Header parameters
| Name | Type | Description |
|---|---|---|
x-hinkal-request-signaturerequired | string | Hex-encoded compact secp256k1 signature: secp256k1_sign(SHA256(binding + "\n" + payload)), where binding is "<METHOD> <routePath>" (this route's own method and path, e.g. "POST /deposit" or "GET /balance") and payload is JSON.stringify(body) for POST requests or the raw query string for GET requests. Binding the route into the signed digest stops a signature captured for one endpoint from being replayed against another. See Authentication for the full signing scheme. |
Responses
200Stuck balances per token
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
balancesrequired | object[] | |
balances[].chainIdrequired | integer | |
balances[].tokenAddressrequired | string | |
balances[].balancerequired | string | Total of all sources, in the token's smallest unit |
balances[].sourcesrequired | object[] | |
balances[].sources[].kindrequired | string | |
balances[].sources[].amountrequired | string | |
balances[].sources[].vaultAddress | string | Only for vault; pass it to POST /recover-stuck-balance |
balances[].sources[].reason | string | Only for vault; why the relayer declined to shield this balance |
noncerequired | string | Echoed per-request nonce from the request. |
400Unsupported `chainId`
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string |
401Invalid signature or reused nonce
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string |
500Server error
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string |
502A service the API calls over HTTP (for example henclave or the relayer) returned an error; retry
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string |
Recover one stuck balance source to a public address
/recover-stuck-balanceRecovers one source of one token from GET /stuck-balances to the public recipientAddress,
using the same logic as the dedicated routes: utxo as POST /withdraw-stuck-utxos (response
txHashes), bridge as POST /recover-stuck-bridge-balance (response recoveredCount,
recoveredAmount, failedCount, errors) and vault as POST /receive-vault-recover (response
txData; needs vaultAddress).
Authorized by a normal mode session (secp256k1 request signature via x-hinkal-request-signature
header, bound to "POST /recover-stuck-balance") or an EIP-712 mode session with a
per-transaction EIP-712 typed-data signature (primary type RecoverStuckBalance) on
EVM/Tron, or an ed25519 plain-text signature on Solana.
Header parameters
| Name | Type | Description |
|---|---|---|
x-hinkal-request-signature | string | Required for normal mode sessions: hex-encoded compact secp256k1 signature secp256k1_sign(SHA256(binding + "\n" + JSON.stringify(body))), where binding is "POST <routePath>" for this endpoint. Omit for EIP-712 mode sessions — include signature in the request body instead. See Authentication for the full signing scheme. |
Request body application/jsonrequired
| Name | Type | Description |
|---|---|---|
sessionIdrequired | string (uuid) | |
noncerequired | string (uuid) | |
chainIdrequired | integer | |
tokenAddressrequired | string | Token of the source, as listed by GET /stuck-balances. For utxo it must be a token
in the Hinkal registry; otherwise the call returns 400. |
recipientAddressrequired | string | Public address on chainId that receives the funds |
kindrequired | string | |
vaultAddress | string | Required for vault, rejected for the other kinds |
ref | string | Whitelisted referral identifier |
signature | string | EIP-712 or ed25519 signature (EIP-712 mode only; omit for normal mode) |
Responses
200Recovered; the fields depend on `kind`
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
txHashes | string[] | utxo only |
recoveredCount | integer | bridge only |
recoveredAmount | string | bridge only |
failedCount | integer | bridge only |
errors | string[] | bridge only |
txData | any | vault only: the recovery transaction, as POST /receive-vault-recover returns it |
noncerequired | string |
400Invalid request (unsupported `chainId`, unknown `kind`, `vaultAddress` missing for `vault` or sent with another kind), unknown token, or no stuck bridge balance for this token
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string |
401Invalid signature or reused nonce
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string |
409Nonce already used
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string |
500Server error
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string |
502A service the API calls over HTTP (for example henclave or the relayer) returned an error; retry
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string |