Deposit
Build a deposit transaction (public → shielded)
/depositReturns 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
| 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 from POST /create-session |
noncerequired | string (uuid) | Per-request UUID. Echoed back in the response. |
signature | string | EIP-712 or ed25519 signature (EIP-712 mode only; omit for normal mode) |
chainIdrequired | integer | |
tokenAddressesrequired | string[] | One or more token addresses. Solana supports exactly one token per deposit. |
amountsrequired | string[] | Amounts in smallest units, index-aligned with tokenAddresses |
ref | string | Referral 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.
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
txDatarequired | one of | |
noncerequired | string | Echoed per-request nonce from the request, added before signing. |
400Validation error
| 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 |
500Server error
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
errorrequired | string |