Hinkal API

Stuck Balances

List every stuck balance on a chain, per token

GET/stuck-balances
https://api.hinkal.io/stuck-balances

Merges 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

NameTypeDescription
sessionIdrequiredstring (uuid)Session identifier UUID from POST /create-session
noncerequiredstring (uuid)Per-request UUID. Echoed back in the response.
chainIdrequiredstringChain ID to check

Header parameters

NameTypeDescription
x-hinkal-request-signaturerequiredstringHex-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
NameTypeDescription
successrequiredboolean
One of: true
balancesrequiredobject[]
balances[].chainIdrequiredinteger
balances[].tokenAddressrequiredstring
balances[].balancerequiredstringTotal of all sources, in the token's smallest unit
balances[].sourcesrequiredobject[]
balances[].sources[].kindrequiredstring
One of: "utxo", "bridge", "vault"
balances[].sources[].amountrequiredstring
balances[].sources[].vaultAddressstringOnly for vault; pass it to POST /recover-stuck-balance
balances[].sources[].reasonstringOnly for vault; why the relayer declined to shield this balance
One of: "expired", "notShieldable", "riskySender"
noncerequiredstringEchoed per-request nonce from the request.
400Unsupported `chainId`
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
401Invalid signature or reused nonce
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
500Server error
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
502A service the API calls over HTTP (for example henclave or the relayer) returned an error; retry
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring

Recover one stuck balance source to a public address

POST/recover-stuck-balance
https://api.hinkal.io/recover-stuck-balance

Recovers 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

NameTypeDescription
x-hinkal-request-signaturestringRequired 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

NameTypeDescription
sessionIdrequiredstring (uuid)
noncerequiredstring (uuid)
chainIdrequiredinteger
tokenAddressrequiredstringToken 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.
recipientAddressrequiredstringPublic address on chainId that receives the funds
kindrequiredstring
One of: "utxo", "bridge", "vault"
vaultAddressstringRequired for vault, rejected for the other kinds
refstringWhitelisted referral identifier
signaturestringEIP-712 or ed25519 signature (EIP-712 mode only; omit for normal mode)

Responses

200Recovered; the fields depend on `kind`
NameTypeDescription
successrequiredboolean
One of: true
txHashesstring[]utxo only
recoveredCountintegerbridge only
recoveredAmountstringbridge only
failedCountintegerbridge only
errorsstring[]bridge only
txDataanyvault only: the recovery transaction, as POST /receive-vault-recover returns it
noncerequiredstring
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
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
401Invalid signature or reused nonce
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
409Nonce already used
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
500Server error
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
502A service the API calls over HTTP (for example henclave or the relayer) returned an error; retry
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring