Hinkal API

Deposit

Build a deposit transaction (public → shielded)

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

Returns an unsigned transaction that moves tokens from the caller's public balance into their Hinkal shielded balance.

EVM / Tron: Returns an unsigned txData object (EVM TransactionRequest shape or Tron transaction object). Authorized by a normal mode session (secp256k1 request signature via x-hinkal-request-signature header) or an EIP-712 mode session with a per-transaction EIP-712 typed-data signature (primary type Deposit).

Solana: Returns txData as a base64-encoded serialized transaction for the client to sign and broadcast. Only one token is supported per Solana deposit. Authorized by a normal mode session (secp256k1 request signature) or a per-transaction ed25519 plain-text signature.

Normal mode: include sessionId and nonce in the body; add x-hinkal-request-signature: secp256k1_sign(SHA256("POST /deposit\n" + JSON.stringify(body))) header.

EIP-712 mode: include sessionId, nonce, and signature in the body.

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 from POST /create-session
noncerequiredstring (uuid)Per-request UUID. Echoed back in the response.
signaturestringEIP-712 or ed25519 signature (EIP-712 mode only; omit for normal mode)
chainIdrequiredinteger
tokenAddressesrequiredstring[]One or more token addresses. Solana supports exactly one token per deposit.
amountsrequiredstring[]Amounts in smallest units, index-aligned with tokenAddresses
refstringReferral code for attribution (must be a whitelisted referral identifier). Attribution is confirmed once the deposit lands on-chain - not at request time, since this endpoint returns an unsigned tx the caller broadcasts itself.

Responses

200Unsigned deposit transaction. - EVM/Tron: `txData` is an EVM TransactionRequest or Tron transaction object. - Solana: `txData` is a base64-encoded serialized transaction.
NameTypeDescription
successrequiredboolean
One of: true
txDatarequiredone of
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