Private Send
Prepare a private send order
/private-sendPrepares 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
| 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 UUID from POST /create-session |
noncerequired | string (uuid) | Per-request UUID. Echoed back in the response. |
chainIdrequired | integer | |
tokenAddressrequired | string | |
recipientsrequired | object[] | |
recipients[].addressrequired | string | |
recipients[].amountrequired | string | Amount in the token's smallest unit |
feeToken | string | |
txCompletionTime | integer | Optional Unix timestamp (seconds) by which all withdrawals must complete |
ref | string | Referral code: a whitelisted referral identifier, or a code agreed with Hinkal that carries a custom Hinkal fee, which then replaces the default Hinkal fee. |
signature | string | EIP-712 or ed25519 signature (EIP-712 mode only; omit for normal mode) |
Responses
200Order prepared
| Name | Type | Description |
|---|---|---|
successrequired | boolean | |
orderIdrequired | string | |
approvalAddressrequired | string | ERC20 spender to approve amountIn for before broadcasting (EVM/Tron).
Always null on Solana. |
serializedTxrequired | string | Base64-encoded unsigned deposit transaction |
amountInrequired | string | |
amountOutrequired | string | |
feerequired | string | |
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 |