Hinkal API

Withdraw

Withdraw tokens from shielded balance to a public address

POST/withdraw
https://api.hinkal.io/withdraw

Relays a withdrawal from the caller's shielded balance to a public recipientAddress.

EVM / Tron: feeToken is required in the request body.

Solana: feeToken is not used — the server always uses tokenAddresses[0] as the fee token regardless of what is passed.

The relay fee is computed automatically. feeAmount is only needed to lock in an exact amount already returned by GET /get-fee.

Authorized by a normal mode session (secp256k1 request signature via x-hinkal-request-signature header, bound to "POST /withdraw"), or an EIP-712 mode session with a per-transaction EIP-712 typed-data signature (primary type Withdraw) 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)
signaturestringEIP-712 or ed25519 signature (EIP-712 mode only)
chainIdrequiredinteger
tokenAddressesrequiredstring[]
amountsrequiredstring[]
recipientAddressrequiredstringPublic address to receive the withdrawn tokens
feeTokenstringToken used to pay the relay fee. Required for EVM/Tron. On Solana, always set to tokenAddresses[0] by the server — any value passed is ignored.
feeAmountstringOptional — omit it and the server computes the fee automatically. Pass it only to lock in a fee amount already quoted from GET /get-fee.
refstringReferral code: a whitelisted referral identifier, or a code agreed with Hinkal that carries a custom Hinkal fee, which then replaces the default Hinkal fee.

Responses

200Relayed transaction hash
NameTypeDescription
successrequiredboolean
One of: true
txHashrequiredstring
noncerequiredstringEchoed per-request nonce from the request, added before signing.
400Validation error
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
500Server error
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring