Hinkal API

Receive Address

Create a public deposit (receive) address, or a transfer address that forwards to one recipient

POST/receive-address
https://api.hinkal.io/receive-address

This endpoint creates one of two kinds of public address. Which one you get depends on whether you pass recipientAddress.

Receive address (no recipientAddress). An address that adds whatever is sent to it to your shielded balance. Share it, the payer makes an ordinary transfer, and a relayer moves the funds into your shielded balance, minus a fee. One address accepts every supported token: it is the same on all EVM chains, and Tron and Solana each have their own. Calling again returns the same address until it expires, then issues a new one; pass forceFresh: true to get a new one sooner. ref must be a whitelisted referral, and the bridge fields are rejected.

Transfer address (with recipientAddress). A one-time address that pays out to recipientAddress, so a public payer can pay a public recipient without the two being linked on chain. Each payment is shielded as blocked UTXOs and then withdrawn to recipientAddress automatically, minus relayer and withdraw fees. The recipient is part of the signed request and cannot be changed. Every call creates a new address (forceFresh is ignored), and the call returns 409 while another transfer address for the same account is being created; retry.

On EVM a transfer address accepts payments on every EVM chain, and each payment is paid out on the chain it was sent on. If the recipient address works on only one chain (for example, an exchange deposit address), the payer must be told which chain to send on.

The fee rate is fixed when the address is created: the Hinkal fee (or the one carried by ref, which may also be a fee discount code), plus the Hinkal Partner fee when the request carries a valid Hinkal Partner API key in x-api-key.

To pay out on a different chain, pass destinationChainId and destinationTokenAddress. Each payment is then bridged to recipientAddress from the chain it arrived on, using the same routes as POST /private-send-bridge. The bridge is quoted when the payment arrives, for the payment minus fees, within slippagePercentage.

When a transfer is not paid out.

  • A payment below the relayer's settle fee waits at the address and is settled together with the next payment.
  • If the payout cannot be made (the payout fails, the payment does not cover the fees, there is no bridge route, or an EVM route charges an extra native fee), the funds stay as stuck UTXOs. Withdraw them with POST /withdraw-stuck-utxos or POST /recover-stuck-balance.
  • If a bridge fails after the funds have left, they are refunded as for a private send bridge. Recover them with POST /recover-stuck-bridge-balance, or with POST /recover-stuck-balance and kind bridge.

Expiry. Both kinds of address are valid for 14 days after creation (expiry). Funds sent to an expired receive address are not shielded; recover them with POST /receive-vault-recover. Payments to an expired transfer address are not paid out: they appear in GET /stuck-balances as vault with reason expired, and are recovered with POST /recover-stuck-balance (kind vault) or POST /receive-vault-recover.

Both kinds are available on EVM, Tron and Solana.

Authorization. A receive address is always authorized by the secp256k1 request signature (x-hinkal-request-signature, bound to "POST /receive-address"), in both normal mode and EIP-712 mode sessions. A transfer address is authorized by a normal mode session (the same request signature) or an EIP-712 mode session with a per-transaction signature in the body and no x-hinkal-request-signature header (with the header, an EIP-712 session gets 403): EIP-712 typed data (primary type TransferAddress: nonce, sessionId, chainId, recipient as address; Tron recipients are signed in hex form; with destinationChainId, primary type TransferAddressBridge with recipient as string plus destinationChainId, destinationTokenAddress and optional slippagePercentage) on EVM/Tron, or an ed25519 signature over the TransferAddress message (header plus Recipient: <address> and the destination lines) on Solana.

Header parameters

NameTypeDescription
x-hinkal-request-signaturestringHex-encoded compact secp256k1 signature secp256k1_sign(SHA256("POST /receive-address\n" + JSON.stringify(body))). Required for a receive address (no recipientAddress) in both session modes, and for a transfer address in a normal mode session. Omit it for a transfer address in an EIP-712 mode session and send signature in the body instead: if the header is present, an EIP-712 session is rejected with 403. See Authentication for the full signing scheme.

Request body application/jsonrequired

NameTypeDescription
sessionIdrequiredstring (uuid)
noncerequiredstring (uuid)
signaturestringPer-transaction signature for a transfer address in an EIP-712 mode session; omit otherwise
chainIdrequiredintegerAny supported chain of the network the address is for (EVM, Tron or Solana).
forceFreshbooleanReceive address only: if true, claims a new address instead of returning the one already issued for that network. Ignored for a transfer address, which is always new.
Default: false
recipientAddressstringSet to create a transfer address: the public address every deposit is forwarded to, in the native format of destinationChainId when set, otherwise of chainId
destinationChainIdintegerTransfer address only. Bridge each payment to this chain. Omit to withdraw on chainId.
destinationTokenAddressstringTransfer address only. Token the recipient receives on destinationChainId. Required with destinationChainId.
slippagePercentageone ofTransfer address only. Max bridge slippage in percent (e.g. "1" = 1%). Only with destinationChainId; defaults per route. Send it as a string to sign exactly what you send; a number is signed in its JavaScript String() form.
refstringReferral code. Receive address: must be a whitelisted referral identifier; it only takes effect when the call registers a new address, and cannot change who an existing address is attributed to. Transfer address: a whitelisted referral identifier, or a code agreed with Hinkal that carries a custom Hinkal fee, which then replaces the default Hinkal fee on the forward.

Responses

200The receive address for the requested network, or the new transfer address
NameTypeDescription
successrequiredboolean
One of: true
recordrequiredobjectThe terms a receive address was derived from, plus the address itself. A receive address belongs to a network, not one chain — the same record covers every EVM chain.
record.indexrequiredinteger
record.networkrequiredstringNetwork the address is for.
One of: "evm", "tron", "solana"
record.expiryrequiredstringUnix timestamp (seconds) when the address expires, 14 days after creation. Deposits sent after it are not shielded automatically.
record.versionrequiredstring
record.vaultAddressrequiredstringThe public deposit address, in the chain's native format.
noncerequiredstringEchoed per-request nonce from the request, added before signing.
400Receive addresses are not available on the requested chain; `ref` is not a whitelisted referral (or is a fee discount code on a receive address); `destinationChainId`, `destinationTokenAddress` or `slippagePercentage` is sent without `recipientAddress`; or, for a transfer address, the bridge route or token is unsupported, the recipient is invalid (including the zero address or the native-token placeholder), `slippagePercentage` is invalid, or `destinationTokenAddress` / `slippagePercentage` is sent without `destinationChainId`
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
401Invalid signature or reused nonce
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
403Transfer address signed with the wrong method for the session mode: sent with `x-hinkal-request-signature` in an EIP-712 mode session (omit the header and send the `TransferAddress` or `TransferAddressBridge` signature in the body), or sent without the header in a normal mode session (send the request signature header)
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
409Nonce already used, or another transfer address for the same account is being created; retry
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
500Server error
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring