For the complete documentation index, see llms.txt. This page is also available as Markdown.

Withdraw

Withdraw tokens from shielded balance to a public address

post

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
x-hinkal-request-signaturestringOptional

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.

Body
sessionIdstring · uuidRequired
noncestring · uuidRequired
signaturestringOptional

EIP-712 or ed25519 signature (EIP-712 mode only)

chainIdintegerRequired
tokenAddressesstring[]Required
amountsstring[]Required
recipientAddressstringRequired

Public address to receive the withdrawn tokens

feeTokenstringOptional

Token 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

Optional — omit it and the server computes the fee automatically. Pass it only to lock in a fee amount already quoted from GET /get-fee.

refstringOptional

Referral code for attribution (must be a whitelisted referral identifier)

Responses
200

Relayed transaction hash

application/json
post/withdraw
POST /withdraw HTTP/1.1
Host: api.hinkal.io
Content-Type: application/json
Accept: */*
Content-Length: 316

{
  "sessionId": "ffd74231-0672-48c7-bd82-9f72a803578b",
  "nonce": "1f45a7a3-c6bc-46c4-8e33-68a07241447a",
  "chainId": 10,
  "tokenAddresses": [
    "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"
  ],
  "amounts": [
    "10000"
  ],
  "recipientAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "feeToken": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"
}
{
  "success": true,
  "txHash": "0x9f2b8c4a1e5d7f3b9c2a4e8f1d5b7c9a3e5f7b1d9c2a4f6e8b1c3d5a7f9e2b4",
  "nonce": "1f45a7a3-c6bc-46c4-8e33-68a07241447a"
}

Last updated