API
Every endpoint, with its request, response and errors.
The API serves what is public and builds the two transactions that need no key: a deposit, and the release step of a withdraw. It never receives a key or a decrypted amount. Setting up, applying, sending and the encrypted step of a withdraw are built where your key is, by the SDK.
This page describes contract version 0.1.1.
Conventions
| Base URL | https://api-production-04502129.up.railway.app |
| Format | JSON in and out. A POST sends Content-Type: application/json. |
| Amounts | base units as decimal strings, such as "500000000" for 500 USDC. They don't fit a JSON number safely, so do the arithmetic in big integers. |
| Assets | "sol" or "usdc" |
| Addresses and signatures | base58 |
| Transactions and ciphertexts | base64 |
| Times | ISO 8601, UTC |
Responses can gain fields and enum values in later versions. Read the ones you know and ignore the rest.
The examples read the base URL from a shell variable, HUSH_API.
The answers shown were captured from a server with status: "fixture", which serves sample data.
Endpoints
| Method | Path | Sends | Returns |
|---|---|---|---|
GET | /health | Health | |
GET | /v1/config | Config | |
GET | /v1/vault | VaultTotals | |
GET | /v1/accounts/{wallet} | Account | |
GET | /v1/activity/{wallet} | ActivityPage | |
GET | /v1/transactions/{signature} | PublicTransaction | |
POST | /v1/transactions | SubmitRequest | Submitted |
POST | /v1/build/deposit | DepositRequest | Built |
POST | /v1/build/withdraw | WithdrawRequest | Built |
One more endpoint sits beside these: POST /v1/rpc, a relay for Solana JSON-RPC.
The @hush/contract package holds a typed client for these endpoints, createClient(baseUrl). It has one method per endpoint, named as the headings below, and parses each answer with the schema the server validated it with. A failed call throws an ApiClientError carrying the status and the error envelope.
Build, submit, follow
Build
POST /v1/build/depositorPOST /v1/build/withdrawreturns an unsigned transaction and the amounts it will move. For a withdraw, the SDK's step comes before this one.Sign and submit
The wallet signs it.
POST /v1/transactionsrelays the signed bytes and returns the signature. A wallet that sends transactions itself can skip the relay.Follow
GET /v1/transactions/{signature}reportspending, thenconfirmed, thenfinalized.
health
GET /health says whether the service is serving a deployed program.
| Field | Type | Description |
|---|---|---|
status required | "live" | "waiting" | "fixture" | live: serving a deployed program. waiting: the program isn't on this network yet. fixture: a server answering with sample data. |
contractVersion required | string | The contract version this server speaks. |
curl "$HUSH_API/health"{ "status": "fixture", "contractVersion": "0.1.1" }config
GET /v1/config returns the addresses and numbers a client needs before it builds anything: the program, the two mints and their vaults, the fee and the amount limit.
| Field | Type | Description |
|---|---|---|
status required | "live" | "waiting" | "fixture" | As in /health. |
cluster required | "localnet" | "devnet" | "mainnet" | "fixture" | The network this API reads and builds for. |
programId required | Address | The hush_vault program. |
tokenProgramId required | Address | Token-2022, which owns both mints. |
assets required | object[] | One entry per asset. |
assets[].asset required | "sol" | "usdc" | The asset's key in requests and responses. |
assets[].symbol required | string | hSOL or hUSDC. |
assets[].underlyingSymbol required | string | SOL or USDC. |
assets[].mint required | Address | The Token-2022 mint of hSOL or hUSDC. |
assets[].underlyingMint required | Address | null | USDC's mint. null for SOL, which the vault holds as lamports. |
assets[].decimals required | integer | Decimals of the asset and of its hSOL or hUSDC mint. |
assets[].vault required | Address | The program's account holding the deposited asset. |
withdrawFeeBps required | integer | The withdraw fee in basis points. |
feeRecipient required | Address | The wallet the withdraw fee is paid to. |
maxAmount required | base units | The largest amount one deposit, send or withdraw takes: 2^48 - 1. |
rpcPath required | string | Path on this API that relays Solana JSON-RPC requests for the SDK. |
explorerCluster required | string | null | The cluster name to put in explorer links. null when the network has no public explorer. |
vault
GET /v1/vault returns the public totals of each asset.
| Field | Type | Description |
|---|---|---|
assets required | object[] | One entry per asset. |
assets[].asset required | "sol" | "usdc" | Which asset. |
assets[].deposited required | base units | What the vault holds. Equal to the supply of the asset's hSOL or hUSDC mint. |
assets[].accounts required | integer | Hush accounts set up for this asset. |
assets[].deposits required | integer | Deposits so far. |
assets[].transfers required | integer | Sends between Hush accounts so far. |
assets[].withdrawals required | integer | Withdraws so far. |
asOf required | timestamp | When these totals were read. |
curl "$HUSH_API/v1/vault"{
"assets": [
{ "asset": "sol", "deposited": "1284507300000", "accounts": 312, "deposits": 1190, "transfers": 2741, "withdrawals": 402 },
{ "asset": "usdc", "deposited": "486210250000", "accounts": 268, "deposits": 904, "transfers": 3318, "withdrawals": 377 }
],
"asOf": "2026-12-02T03:27:25.608Z"
}account
GET /v1/accounts/{wallet} returns what the chain shows about a wallet's Hush accounts. Use it for your own wallet, and to check a recipient before a send: a recipient whose state is none for the asset can't be paid yet.
| Parameter | Type | Description |
|---|---|---|
wallet required | Address, in path | Any wallet address, yours or a recipient's. |
| Field | Type | Description |
|---|---|---|
wallet required | Address | The wallet asked about. |
solBalance required | base units | The wallet's lamports, for fees and rent. |
assets required | object[] | One entry per asset, whether or not the wallet has set it up. |
assets[].asset required | "sol" | "usdc" | Which asset. |
assets[].tokenAccount required | Address | The address of the wallet's Hush account for this asset. It is derived from the wallet and the mint, so it is given even before the account exists. |
assets[].state required | "none" | "ready" | none: not set up for this asset. ready: set up, and able to receive. |
assets[].elgamalPubkey required | string | null | The account's encryption public key, base58 of 32 bytes. null until set up. |
assets[].pendingCredits required | integer | Credits waiting in pending. Above 0, there is something to apply. |
assets[].maxPendingCredits required | integer | How many credits pending holds between applies. |
assets[].publicBalance required | base units | hSOL or hUSDC held outside the encrypted balance. 0 except between the two steps of a withdraw. |
assets[].walletBalance required | base units | The plain asset in the wallet: lamports for SOL, USDC base units for USDC. |
assets[].availableCiphertext required | base64 | null | The available balance as the chain stores it: a 64-byte ElGamal ciphertext. null until set up. |
assets[].decryptableAvailable required | base64 | null | The owner copy of the available balance: a 36-byte AES ciphertext. null until set up. |
assets[].pendingLo required | base64 | null | The low part of the pending balance, an ElGamal ciphertext. Pending is decrypt(pendingLo) + decrypt(pendingHi) × 2^16. null until set up. |
assets[].pendingHi required | base64 | null | The high part of the pending balance. null until set up. |
asOf required | timestamp | When this state was read. |
curl "$HUSH_API/v1/accounts/wQ7CtxeMw1WHo6Ho3keSr7xYatte8HxuEYbJ1ELrE75"{
"wallet": "wQ7CtxeMw1WHo6Ho3keSr7xYatte8HxuEYbJ1ELrE75",
"solBalance": "4200000000",
"assets": [
{
"asset": "sol",
"tokenAccount": "3aroSeUw2Xw9nyHVRuQHumhgr7WT84TbaMhcyWKXM2f1",
"state": "ready",
"elgamalPubkey": "J1BZJPC1Er7XtxtHqtsXPZq8y3V9UcbXRr4U2KK7TFMJ",
"pendingCredits": 0,
"maxPendingCredits": 65536,
"publicBalance": "0",
"walletBalance": "4200000000",
"availableCiphertext": "GhvijbafHHHRDpQk0U6HdxdalKEF174lnnaDosJc6C8IbMgJ31U76leSKiVGzdaPXPFwoOSgaNIub2ImDGWMNQ==",
"decryptableAvailable": "AAq0cumfV0NcSwD4kBzTgmxoJm43lJuo9dRVJ6fF4vntqCHk",
"pendingLo": "RuXpOgNgP55flYs9UiGNVbOQZeb5pI03i1tuigGfCVJs+5HBWX+3dFuhjXLNOP0+htQnhgd8uWWk18tNltu4RQ==",
"pendingHi": "PuUrLyufInsQiC6XLq92cT6HmpRo01Sndj/2x8Btb3XYfMR2sWuMy3P6mG4FtleSFW8eaqzVRfZwCeDtTr/nQw=="
},
{
"asset": "usdc",
"tokenAccount": "DZUj94XFfxKTi2aSDz7z8Z7KMhgRX2TH4NPpMRv8TQtk",
"state": "ready",
"elgamalPubkey": "J1BZJPC1Er7XtxtHqtsXPZq8y3V9UcbXRr4U2KK7TFMJ",
"pendingCredits": 0,
"maxPendingCredits": 65536,
"publicBalance": "0",
"walletBalance": "1520000000",
"availableCiphertext": "nmra3WNXIMIRSCeAVQn8q2ppj+xl+8roS+zcQwzrBjViWnv61lHMpduyLmEW2d7Rfj5EP8DWDJDcibjQE/vNMw==",
"decryptableAvailable": "7v54+TDW2R1kWADHA/k3v2/wgXO2WTFsrZTXyN1Ri/ZBFRsE",
"pendingLo": "fJpDMKWpvf37hscM6qpx4KOvvL9mBez/lKW4Hl8ilkicDMjRhxdF+EFtgTZHgXEXw1GQ87v17DvHuqRHIv8udQ==",
"pendingHi": "XGThdn+4nXvtg/OYmloHSg/APugMK/3p7CummXn8TCjwADi5jwYql/GmOc593+yBcGN1ZbdVxqR8tmfVxVEkEg=="
}
],
"asOf": "2026-12-02T03:33:47.495Z"
}The balances arrive as the chain stores them, as ciphertexts. The SDK decrypts them with your key: decryptableAvailable gives the available balance, and pendingLo with pendingHi gives pending.
activity
GET /v1/activity/{wallet} lists a wallet's Hush transactions, newest first. A deposit or a withdraw carries its amount. A send or a receive carries the amount as a ciphertext for that wallet's key, which the SDK decrypts.
| Parameter | Type | Description |
|---|---|---|
wallet required | Address, in path | The wallet whose activity to list. |
cursor | string, in query | The nextCursor of the page before. |
limit | integer, in query | Items per page. From 1 to 100. Default 24. |
asset | "sol" | "usdc", in query | Leave out for both assets. |
| Field | Type | Description |
|---|---|---|
items required | object[] | Newest first. |
items[].signature required | Signature | The transaction. |
items[].kind required | "setup" | "deposit" | "apply" | "send" | "receive" | "withdraw" | What the transaction did for this wallet. |
items[].asset required | "sol" | "usdc" | Which asset. |
items[].slot required | integer | The slot it landed in. |
items[].at required | timestamp | Its block time. |
items[].publicAmount required | base units | null | The amount of a deposit or a withdraw. null for the other kinds. |
items[].fee required | base units | null | The withdraw fee. null for the other kinds. |
items[].counterparty required | Address | null | The other wallet of a send or a receive. null for the other kinds. |
items[].encryptedAmount required | object | null | The amount of a send, encrypted to the sender, or of a receive, encrypted to the recipient. null for the other kinds. |
items[].encryptedAmount.lo required | base64 | Ciphertext of the amount's low 16 bits: 64 bytes, a 32-byte commitment then a 32-byte decrypt handle. |
items[].encryptedAmount.hi required | base64 | Ciphertext of the amount's high 32 bits, in the same layout. |
page required | object | Where this page sits in the list. |
page.nextCursor required | string | null | Pass as cursor to get the next page. null on the last page. |
page.hasMore required | boolean | Whether a next page exists. |
asOf required | timestamp | When this page was read. |
curl "$HUSH_API/v1/activity/wQ7CtxeMw1WHo6Ho3keSr7xYatte8HxuEYbJ1ELrE75?asset=usdc&limit=3"{
"items": [
{
"signature": "4KiFeU5jkttQbmfhQAEVjkKMChczZ7BbLp4DhyaeJi9w8gtaBea5C6UE7HSNM1AuhCB7LmFRxCcFrQFa5L5CYBqE",
"kind": "send",
"asset": "usdc",
"slot": 300009000,
"at": "2026-12-02T03:16:32.274Z",
"publicAmount": null,
"fee": null,
"counterparty": "CuW6XTTM2sB15fM3nGhBMurDSfHApayxH7Ze6GvvUxbn",
"encryptedAmount": {
"lo": "wkXjEMaX0DpJGP7gldOYSrioOU7GMMhGhpQQOZGTESDYpsrgy5rc8+vwMMoGnQsTA9CrVHT4IvpyUAWxeaZ/Nw==",
"hi": "miUAvWUHJNBjEo8kLgtTXfby3t6SUvYIbA88WYXiMhLSh/axzP4SrcP4hXwHeAhwqEjLfxfHzht9Zac0RoUCaA=="
}
},
{
"signature": "5ixfaZCKcVNDaDjPJWqYXtpf1rNxWpDrQsqGcNsk8noCrtKLEZ7vajTyhJ2jQ3fbuxwKt67Ba3p3xxvCPiVc7SoX",
"kind": "receive",
"asset": "usdc",
"slot": 300004000,
"at": "2026-11-30T02:28:32.274Z",
"publicAmount": null,
"fee": null,
"counterparty": "CuW6XTTM2sB15fM3nGhBMurDSfHApayxH7Ze6GvvUxbn",
"encryptedAmount": {
"lo": "mCYKCBxADd3IifU7zyBNSuRRrTeEWlnynmoETDvphBDSu4SlQYwxHqu0ql79EgdRkNfwLihkis+TScFEy/ePFA==",
"hi": "spRkT/C3guZ0GzLjZYzdlmSCRz2EJO/z4aPcq84jDHowaRNBqeZeKKcLyD18cVy9kcNGMEpME7LTrGR6bmK2Ww=="
}
},
{
"signature": "4EWEpzrWaq1W5e3vFr2tby4dnomgrgyuahdmrFxTcQfMsuaMuzqMA8bA2ac8RVbsNMu9pfRfmfTXrryaBCbh7JPG",
"kind": "deposit",
"asset": "usdc",
"slot": 300003000,
"at": "2026-11-30T01:28:32.274Z",
"publicAmount": "2000000000",
"fee": null,
"counterparty": null,
"encryptedAmount": null
}
],
"page": { "nextCursor": "3", "hasMore": true },
"asOf": "2026-12-02T03:28:32.274Z"
}The amount of a send or a receive is decrypt(lo) + decrypt(hi) × 2^16.
transaction
GET /v1/transactions/{signature} returns one transaction's status and its public view. For a send, ciphertexts holds the amount as the chain stores it, once for each party.
| Parameter | Type | Description |
|---|---|---|
signature required | Signature, in path | The transaction's signature. |
| Field | Type | Description |
|---|---|---|
signature required | Signature | The transaction. |
status required | "pending" | "confirmed" | "finalized" | "failed" | pending until the network confirms it, then confirmed, then finalized. failed if it landed with an error. |
error required | string | null | When failed: the network's error for the transaction, as JSON text. |
kind required | "setup" | "deposit" | "apply" | "send" | "receive" | "withdraw" | null | What the transaction did. null while pending. |
asset required | "sol" | "usdc" | null | Which asset. null while pending. |
slot required | integer | null | The slot it landed in. |
at required | timestamp | null | Its block time. |
from required | Address | null | The wallet that sent, deposited or withdrew. |
to required | Address | null | The recipient wallet of a send. |
fromTokenAccount required | Address | null | The sender's Hush account. |
toTokenAccount required | Address | null | The recipient's Hush account. |
publicAmount required | base units | null | The amount of a deposit or a withdraw. null for a send. |
fee required | base units | null | The withdraw fee. |
ciphertexts required | object | null | A send's amount as the chain stores it. null for the other kinds. |
ciphertexts.source required | object | The amount encrypted to the sender. |
ciphertexts.source.lo required | base64 | Low 16 bits, 64 bytes. |
ciphertexts.source.hi required | base64 | High 32 bits, 64 bytes. |
ciphertexts.destination required | object | The amount encrypted to the recipient. |
ciphertexts.destination.lo required | base64 | Low 16 bits, 64 bytes. |
ciphertexts.destination.hi required | base64 | High 32 bits, 64 bytes. |
Raises NOT_FOUND when no transaction has this signature.
curl "$HUSH_API/v1/transactions/4KiFeU5jkttQbmfhQAEVjkKMChczZ7BbLp4DhyaeJi9w8gtaBea5C6UE7HSNM1AuhCB7LmFRxCcFrQFa5L5CYBqE"{
"signature": "4KiFeU5jkttQbmfhQAEVjkKMChczZ7BbLp4DhyaeJi9w8gtaBea5C6UE7HSNM1AuhCB7LmFRxCcFrQFa5L5CYBqE",
"status": "finalized",
"error": null,
"kind": "send",
"asset": "usdc",
"slot": 300009000,
"at": "2026-12-02T03:16:39.763Z",
"from": "wQ7CtxeMw1WHo6Ho3keSr7xYatte8HxuEYbJ1ELrE75",
"to": "CuW6XTTM2sB15fM3nGhBMurDSfHApayxH7Ze6GvvUxbn",
"fromTokenAccount": "DZUj94XFfxKTi2aSDz7z8Z7KMhgRX2TH4NPpMRv8TQtk",
"toTokenAccount": "iKvaWQm8CjepHT4upqBs7bHegz1YsyYA9WQHwwTyve3",
"publicAmount": null,
"fee": null,
"ciphertexts": {
"source": {
"lo": "wkXjEMaX0DpJGP7gldOYSrioOU7GMMhGhpQQOZGTESDYpsrgy5rc8+vwMMoGnQsTA9CrVHT4IvpyUAWxeaZ/Nw==",
"hi": "miUAvWUHJNBjEo8kLgtTXfby3t6SUvYIbA88WYXiMhLSh/axzP4SrcP4hXwHeAhwqEjLfxfHzht9Zac0RoUCaA=="
},
"destination": {
"lo": "wkXjEMaX0DpJGP7gldOYSrioOU7GMMhGhpQQOZGTESBajoJZAOnHutg5KJLQJrW2M+gvTji772KZhu9vDhpkAQ==",
"hi": "miUAvWUHJNBjEo8kLgtTXfby3t6SUvYIbA88WYXiMhJSTvLexk5pfaOzgJIJirr3m5cwpH11ARFcZmU/lAo1CQ=="
}
}
}submit
POST /v1/transactions relays a signed transaction to the network.
| Field | Type | Description |
|---|---|---|
transaction required | base64 | The signed transaction, serialized. |
| Field | Type | Description |
|---|---|---|
signature required | Signature | The transaction's signature. Follow it with GET /v1/transactions/{signature}. |
The network simulates the transaction before accepting it. Raises SIMULATION_FAILED, with the network's message, when the simulation fails or the bytes aren't a transaction.
buildDeposit
POST /v1/build/deposit builds a deposit: the asset moves from the wallet to the vault and the same amount is credited to the wallet's pending balance.
| Field | Type | Description |
|---|---|---|
wallet required | Address | The depositing wallet. It pays the transaction fee. |
asset required | "sol" | "usdc" | Which asset. |
amount required | base units | How much to deposit. Above 0 and at most 2^48 - 1. |
The response is a Built:
| Field | Type | Description |
|---|---|---|
transaction required | base64 | An unsigned v0 transaction with the wallet as fee payer. |
lastValidBlockHeight required | integer | The block height after which this transaction can no longer land. |
amount required | base units | Deposit: what leaves the wallet. Withdraw: what is burned. |
fee required | base units | The withdraw fee. 0 for a deposit. |
receive required | base units | Deposit: the credit that arrives in pending. Withdraw: the SOL or USDC that arrives in the wallet. |
Raises ACCOUNT_NOT_SET_UP when the wallet has no Hush account for the asset, PENDING_LIMIT_REACHED when the account's pending balance holds its maximum number of credits, and INSUFFICIENT_FUNDS when the wallet holds less than the amount. A SOL deposit needs the amount plus 10,000 lamports for the transaction fee.
curl "$HUSH_API/v1/build/deposit" \
-H 'Content-Type: application/json' \
-d '{"wallet":"wQ7CtxeMw1WHo6Ho3keSr7xYatte8HxuEYbJ1ELrE75","asset":"usdc","amount":"500000000"}'{
"transaction": "RklYVFVSRV9OT1RfQV9TT0xBTkFfVFJBTlNBQ1RJT046ZGVwb3NpdDp1c2RjOjUwMDAwMDAwMDp3UTdDdHhlTXcxV0hvNkhvM2tlU3I3eFlhdHRlOEh4dUVZYkoxRUxyRTc1",
"lastValidBlockHeight": 300000150,
"amount": "500000000",
"fee": "0",
"receive": "500000000"
}buildWithdraw
POST /v1/build/withdraw builds the release step of a withdraw: it burns the wallet's hSOL or hUSDC that sits outside the encrypted balance and pays SOL or USDC from the vault, less the 0.10% fee. The step before it, which moves the amount out of the encrypted balance, carries proofs and is built by the SDK.
| Field | Type | Description |
|---|---|---|
wallet required | Address | The withdrawing wallet. It pays the transaction fee. |
asset required | "sol" | "usdc" | Which asset. |
amount required | base units | How much hSOL or hUSDC to burn. Above 0 and at most 2^48 - 1. |
The response is a Built, as for a deposit. Raises ACCOUNT_NOT_SET_UP when the wallet has no Hush account for the asset, and INSUFFICIENT_FUNDS when the account's publicBalance is below the amount, which means the SDK's step hasn't run yet.
curl "$HUSH_API/v1/build/withdraw" \
-H 'Content-Type: application/json' \
-d '{"wallet":"wQ7CtxeMw1WHo6Ho3keSr7xYatte8HxuEYbJ1ELrE75","asset":"usdc","amount":"500000000"}'{
"transaction": "RklYVFVSRV9OT1RfQV9TT0xBTkFfVFJBTlNBQ1RJT046d2l0aGRyYXc6dXNkYzo1MDAwMDAwMDA6d1E3Q3R4ZU13MVdIbzZIbzNrZVNyN3hZYXR0ZThIeHVFWWJKMUVMckU3NQ==",
"lastValidBlockHeight": 300000150,
"amount": "500000000",
"fee": "500000",
"receive": "499500000"
}rpc
POST /v1/rpc relays Solana JSON-RPC 2.0 requests to the network, so the SDK in a browser can read accounts and simulate without an RPC endpoint of its own. The path is also given as rpcPath in config.
The body is one JSON-RPC request object, or an array of up to 10. The answer is the network's JSON-RPC response, passed through.
| Methods | getAccountInfo, getMultipleAccounts, getBalance, getTokenAccountBalance, getLatestBlockhash, getMinimumBalanceForRentExemption, getSignatureStatuses, getEpochInfo, getSlot, getBlockHeight, simulateTransaction |
| Batch | Up to 10 requests in one body |
| Body size | Up to 64 KiB |
| Rate | 120 requests a minute for each client IP |
Raises VALIDATION_ERROR, naming the method, for a method outside the list, and for a body that isn't JSON-RPC or a batch that is empty or too long. sendTransaction is outside the list: signed transactions go to POST /v1/transactions. Raises PAYLOAD_TOO_LARGE above the body size, RATE_LIMITED with retryAfterSeconds above the rate, UPSTREAM_UNAVAILABLE when the network RPC doesn't answer, and PROGRAM_UNAVAILABLE on a server with no network behind it.
Errors
A failed request answers with its HTTP status and one envelope:
| Field | Type | Description |
|---|---|---|
error required | object | The envelope. |
error.code required | ErrorCode | One of the codes below. Branch on this. |
error.message required | string | A sentence that can be shown to a person. |
error.retryable required | boolean | Whether sending the same request again can succeed. |
error.stage required | "validation" | "auth" | "read" | "upload" | "build" | "wallet" | "co_sign" | "simulation" | "send" | "confirmation" | The step of the flow that failed. |
error.fieldErrors | object | With VALIDATION_ERROR: each rejected field and why. |
error.programError | object | When a program refused the transaction. |
error.programError.programId required | Address | The program that refused. |
error.programError.name required | string | Its error's name. |
error.programError.number | integer | Its error's number. |
error.retryAfterSeconds | integer | With RATE_LIMITED: how long to wait. |
error.requestId | string | An id for this request, to quote when reporting a problem. |
curl "$HUSH_API/v1/build/deposit" \
-H 'Content-Type: application/json' \
-d '{"wallet":"wQ7CtxeMw1WHo6Ho3keSr7xYatte8HxuEYbJ1ELrE75","asset":"usdc","amount":"0"}'{
"error": {
"code": "VALIDATION_ERROR",
"message": "Check the highlighted fields.",
"retryable": false,
"stage": "validation",
"fieldErrors": { "amount": ["Must be greater than zero."] }
}
}Error codes
| Code | Status | Raised when |
|---|---|---|
VALIDATION_ERROR | 400 | A path, query or body value doesn't match its type. fieldErrors names each one. |
UNAUTHORIZED | 401 | The request needs a session it doesn't carry. No current endpoint needs one. |
ORIGIN_NOT_ALLOWED | 403 | A browser request came from an origin the API doesn't accept. |
NOT_FOUND | 404 | No route at this path, or no transaction with this signature. |
PROGRAM_UNAVAILABLE | 409 | The program isn't on this network yet, so nothing can be built or relayed. |
CONFIGURATION_REQUIRED | 409 | The service is still waiting for its configuration. |
IDEMPOTENCY_CONFLICT | 409 | The same request was already made. |
TRANSACTION_EXPIRED | 409 | The transaction's blockhash expired before it landed. Build and sign again. |
PAYLOAD_TOO_LARGE | 413 | The request body is too large. The JSON-RPC relay takes 64 KiB. |
UNSUPPORTED_MEDIA_TYPE | 415 | A POST body that isn't application/json. |
SIMULATION_FAILED | 422 | A submitted transaction failed the network's simulation, or its bytes are not a transaction. The message carries the network's reason. |
CHAIN_REFUSED | 422 | The network refused the submitted transaction. |
RATE_LIMITED | 429 | Too many requests. retryAfterSeconds says how long to wait. |
INTERNAL_ERROR | 500 | The request could not be completed. |
UPSTREAM_UNAVAILABLE | 502 | The network RPC behind the API is not answering. |
ACCOUNT_NOT_SET_UP | 409 | The wallet has no Hush account for this asset. Set up, then build again. |
RECIPIENT_NOT_SET_UP | 409 | The recipient has no Hush account for this asset, so a send can't reach them. |
INSUFFICIENT_FUNDS | 422 | The wallet holds less SOL or USDC than the deposit, or the Hush account's public balance is below the withdraw. |
AMOUNT_TOO_LARGE | 400 | The amount is above 2^48 - 1 base units. |
PENDING_LIMIT_REACHED | 409 | The account's pending balance holds its maximum number of credits. Its owner applies, then it can take a deposit again. |