Recover Stuck Bridge Balance
Recover balances left by a failed private send bridge payout
/recover-stuck-bridge-balanceRecovers 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
| 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) | Session identifier UUID from POST /create-session |
noncerequired | string (uuid) | Per-request UUID. Echoed back in the response. |
chainIdrequired | integer | Chain the funds are stuck on |
tokenAddressrequired | string | Token to recover, as returned by GET /stuck-bridge-balance |
recipientAddressrequired | string | Public address on chainId that receives the funds |
signature | string | EIP-712 or ed25519 signature (EIP-712 mode only; omit for normal mode) |
Responses
200At least one stuck bridge balance recovered
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
recoveredCountrequired | integer | Number of stuck balances recovered |
recoveredAmountrequired | string | Total of the recovered balances in the token's smallest unit, before recovery fees |
failedCountrequired | integer | Number of stuck balances that could not be recovered |
errorsrequired | string[] | Error message for each balance that could not be recovered |
noncerequired | string | Echoed per-request nonce from the request, added before signing. |
400Invalid request, or `No stuck bridge balance found for this token`
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string |
401Invalid signature or reused nonce
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string |
409Request `nonce` already consumed. Each `nonce` is single-use; generate a fresh UUID for every request.
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string |
500None of the balances could be recovered, or an internal error
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string | The first error message |
errors | string[] | Error message for each balance, when none was recovered |