Hinkal API

Private Send

Prepare a private send order

POST/private-send
https://api.hinkal.io/private-send

Prepares an order that deposits the caller's public funds and privately pays one or more recipients. Returns a serialized unsigned deposit transaction; once the caller broadcasts it, the enclave detects the on-chain deposit and schedules the private withdrawals. Track progress with GET /private-send/{orderId}.

Works for EVM, Tron, and Solana. On Solana, approvalAddress is always null.

The response also has txData: the same transaction as serializedTx, as an object. On EVM it has no nonce, gas limit or chain ID.

Authorized by a normal mode session (secp256k1 request signature via x-hinkal-request-signature header, bound to "POST /private-send") or an EIP-712 mode session with a per-transaction EIP-712 typed-data signature (primary type PrivateSend) 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

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 UUID from POST /create-session
noncerequiredstring (uuid)Per-request UUID. Echoed back in the response.
chainIdrequiredinteger
tokenAddressrequiredstring
recipientsrequiredobject[]
recipients[].addressrequiredstring
recipients[].amountrequiredstringAmount in the token's smallest unit
feeTokenstring
txCompletionTimeintegerOptional Unix timestamp (seconds) by which all withdrawals must complete
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.
signaturestringEIP-712 or ed25519 signature (EIP-712 mode only; omit for normal mode)

Responses

200Order prepared
NameTypeDescription
successrequiredboolean
One of: true
orderIdrequiredstring
approvalAddressrequiredstringERC20 spender to approve amountIn for before broadcasting (EVM/Tron). Always null on Solana.
serializedTxrequiredstringBase64-encoded unsigned deposit transaction
amountInrequiredstring
amountOutrequiredstring
feerequiredstring
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