Hinkal API

Recover Stuck Bridge Balance

Recover balances left by a failed private send bridge payout

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

Recovers every stuck bridge balance of tokenAddress on chainId, one after another, and sends it to the public recipientAddress. The recovery fee is deducted from each recovered amount. NEAR Intents refunds are withdrawn to recipientAddress on chainId.

Returns 200 when at least one balance was recovered; balances that failed are counted in failedCount with their messages in errors, and can be retried by calling again. Returns 500 with the first message in error and all messages in errors when none was recovered.

Authorized by a normal mode session (secp256k1 request signature via x-hinkal-request-signature header, bound to "POST /recover-stuck-bridge-balance") or an EIP-712 mode session with a per-transaction EIP-712 typed-data signature (primary type RecoverStuckBridgeBalance) on EVM/Tron, or an ed25519 plain-text signature on Solana.

Normal mode: include x-hinkal-request-signature header; omit signature. EIP-712 mode: include signature in body; omit x-hinkal-request-signature header.

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)Session identifier UUID from POST /create-session
noncerequiredstring (uuid)Per-request UUID. Echoed back in the response.
chainIdrequiredintegerChain the funds are stuck on
tokenAddressrequiredstringToken to recover, as returned by GET /stuck-bridge-balance
recipientAddressrequiredstringPublic address on chainId that receives the funds
signaturestringEIP-712 or ed25519 signature (EIP-712 mode only; omit for normal mode)

Responses

200At least one stuck bridge balance recovered
NameTypeDescription
successrequiredboolean
One of: true
recoveredCountrequiredintegerNumber of stuck balances recovered
recoveredAmountrequiredstringTotal of the recovered balances in the token's smallest unit, before recovery fees
failedCountrequiredintegerNumber of stuck balances that could not be recovered
errorsrequiredstring[]Error message for each balance that could not be recovered
noncerequiredstringEchoed per-request nonce from the request, added before signing.
400Invalid request, or `No stuck bridge balance found for this token`
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
401Invalid signature or reused nonce
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
409Request `nonce` already consumed. Each `nonce` is single-use; generate a fresh UUID for every request.
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
500None of the balances could be recovered, or an internal error
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstringThe first error message
errorsstring[]Error message for each balance, when none was recovered