API

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 URLhttps://api-production-04502129.up.railway.app
FormatJSON in and out. A POST sends Content-Type: application/json.
Amountsbase 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 signaturesbase58
Transactions and ciphertextsbase64
TimesISO 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

MethodPathSendsReturns
GET/healthHealth
GET/v1/configConfig
GET/v1/vaultVaultTotals
GET/v1/accounts/{wallet}Account
GET/v1/activity/{wallet}ActivityPage
GET/v1/transactions/{signature}PublicTransaction
POST/v1/transactionsSubmitRequestSubmitted
POST/v1/build/depositDepositRequestBuilt
POST/v1/build/withdrawWithdrawRequestBuilt

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

  1. Build

    POST /v1/build/deposit or POST /v1/build/withdraw returns an unsigned transaction and the amounts it will move. For a withdraw, the SDK's step comes before this one.

  2. Sign and submit

    The wallet signs it. POST /v1/transactions relays the signed bytes and returns the signature. A wallet that sends transactions itself can skip the relay.

  3. Follow

    GET /v1/transactions/{signature} reports pending, then confirmed, then finalized.

health

GET /health says whether the service is serving a deployed program.

FieldTypeDescription
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 requiredstringThe contract version this server speaks.
bash
curl "$HUSH_API/health"
json
{ "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.

FieldTypeDescription
status required"live" | "waiting" | "fixture"As in /health.
cluster required"localnet" | "devnet" | "mainnet" | "fixture"The network this API reads and builds for.
programId requiredAddressThe hush_vault program.
tokenProgramId requiredAddressToken-2022, which owns both mints.
assets requiredobject[]One entry per asset.
assets[].asset required"sol" | "usdc"The asset's key in requests and responses.
assets[].symbol requiredstringhSOL or hUSDC.
assets[].underlyingSymbol requiredstringSOL or USDC.
assets[].mint requiredAddressThe Token-2022 mint of hSOL or hUSDC.
assets[].underlyingMint requiredAddress | nullUSDC's mint. null for SOL, which the vault holds as lamports.
assets[].decimals requiredintegerDecimals of the asset and of its hSOL or hUSDC mint.
assets[].vault requiredAddressThe program's account holding the deposited asset.
withdrawFeeBps requiredintegerThe withdraw fee in basis points.
feeRecipient requiredAddressThe wallet the withdraw fee is paid to.
maxAmount requiredbase unitsThe largest amount one deposit, send or withdraw takes: 2^48 - 1.
rpcPath requiredstringPath on this API that relays Solana JSON-RPC requests for the SDK.
explorerCluster requiredstring | nullThe 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.

FieldTypeDescription
assets requiredobject[]One entry per asset.
assets[].asset required"sol" | "usdc"Which asset.
assets[].deposited requiredbase unitsWhat the vault holds. Equal to the supply of the asset's hSOL or hUSDC mint.
assets[].accounts requiredintegerHush accounts set up for this asset.
assets[].deposits requiredintegerDeposits so far.
assets[].transfers requiredintegerSends between Hush accounts so far.
assets[].withdrawals requiredintegerWithdraws so far.
asOf requiredtimestampWhen these totals were read.
bash
curl "$HUSH_API/v1/vault"
json
{
  "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.

ParameterTypeDescription
wallet requiredAddress, in pathAny wallet address, yours or a recipient's.
FieldTypeDescription
wallet requiredAddressThe wallet asked about.
solBalance requiredbase unitsThe wallet's lamports, for fees and rent.
assets requiredobject[]One entry per asset, whether or not the wallet has set it up.
assets[].asset required"sol" | "usdc"Which asset.
assets[].tokenAccount requiredAddressThe 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 requiredstring | nullThe account's encryption public key, base58 of 32 bytes. null until set up.
assets[].pendingCredits requiredintegerCredits waiting in pending. Above 0, there is something to apply.
assets[].maxPendingCredits requiredintegerHow many credits pending holds between applies.
assets[].publicBalance requiredbase unitshSOL or hUSDC held outside the encrypted balance. 0 except between the two steps of a withdraw.
assets[].walletBalance requiredbase unitsThe plain asset in the wallet: lamports for SOL, USDC base units for USDC.
assets[].availableCiphertext requiredbase64 | nullThe available balance as the chain stores it: a 64-byte ElGamal ciphertext. null until set up.
assets[].decryptableAvailable requiredbase64 | nullThe owner copy of the available balance: a 36-byte AES ciphertext. null until set up.
assets[].pendingLo requiredbase64 | nullThe low part of the pending balance, an ElGamal ciphertext. Pending is decrypt(pendingLo) + decrypt(pendingHi) × 2^16. null until set up.
assets[].pendingHi requiredbase64 | nullThe high part of the pending balance. null until set up.
asOf requiredtimestampWhen this state was read.
bash
curl "$HUSH_API/v1/accounts/wQ7CtxeMw1WHo6Ho3keSr7xYatte8HxuEYbJ1ELrE75"
json
{
  "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.

ParameterTypeDescription
wallet requiredAddress, in pathThe wallet whose activity to list.
cursorstring, in queryThe nextCursor of the page before.
limitinteger, in queryItems per page. From 1 to 100. Default 24.
asset"sol" | "usdc", in queryLeave out for both assets.
FieldTypeDescription
items requiredobject[]Newest first.
items[].signature requiredSignatureThe 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 requiredintegerThe slot it landed in.
items[].at requiredtimestampIts block time.
items[].publicAmount requiredbase units | nullThe amount of a deposit or a withdraw. null for the other kinds.
items[].fee requiredbase units | nullThe withdraw fee. null for the other kinds.
items[].counterparty requiredAddress | nullThe other wallet of a send or a receive. null for the other kinds.
items[].encryptedAmount requiredobject | nullThe amount of a send, encrypted to the sender, or of a receive, encrypted to the recipient. null for the other kinds.
items[].encryptedAmount.lo requiredbase64Ciphertext of the amount's low 16 bits: 64 bytes, a 32-byte commitment then a 32-byte decrypt handle.
items[].encryptedAmount.hi requiredbase64Ciphertext of the amount's high 32 bits, in the same layout.
page requiredobjectWhere this page sits in the list.
page.nextCursor requiredstring | nullPass as cursor to get the next page. null on the last page.
page.hasMore requiredbooleanWhether a next page exists.
asOf requiredtimestampWhen this page was read.
bash
curl "$HUSH_API/v1/activity/wQ7CtxeMw1WHo6Ho3keSr7xYatte8HxuEYbJ1ELrE75?asset=usdc&limit=3"
json
{
  "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.

ParameterTypeDescription
signature requiredSignature, in pathThe transaction's signature.
FieldTypeDescription
signature requiredSignatureThe 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 requiredstring | nullWhen failed: the network's error for the transaction, as JSON text.
kind required"setup" | "deposit" | "apply" | "send" | "receive" | "withdraw" | nullWhat the transaction did. null while pending.
asset required"sol" | "usdc" | nullWhich asset. null while pending.
slot requiredinteger | nullThe slot it landed in.
at requiredtimestamp | nullIts block time.
from requiredAddress | nullThe wallet that sent, deposited or withdrew.
to requiredAddress | nullThe recipient wallet of a send.
fromTokenAccount requiredAddress | nullThe sender's Hush account.
toTokenAccount requiredAddress | nullThe recipient's Hush account.
publicAmount requiredbase units | nullThe amount of a deposit or a withdraw. null for a send.
fee requiredbase units | nullThe withdraw fee.
ciphertexts requiredobject | nullA send's amount as the chain stores it. null for the other kinds.
ciphertexts.source requiredobjectThe amount encrypted to the sender.
ciphertexts.source.lo requiredbase64Low 16 bits, 64 bytes.
ciphertexts.source.hi requiredbase64High 32 bits, 64 bytes.
ciphertexts.destination requiredobjectThe amount encrypted to the recipient.
ciphertexts.destination.lo requiredbase64Low 16 bits, 64 bytes.
ciphertexts.destination.hi requiredbase64High 32 bits, 64 bytes.

Raises NOT_FOUND when no transaction has this signature.

bash
curl "$HUSH_API/v1/transactions/4KiFeU5jkttQbmfhQAEVjkKMChczZ7BbLp4DhyaeJi9w8gtaBea5C6UE7HSNM1AuhCB7LmFRxCcFrQFa5L5CYBqE"
json
{
  "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.

FieldTypeDescription
transaction requiredbase64The signed transaction, serialized.
FieldTypeDescription
signature requiredSignatureThe 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.

FieldTypeDescription
wallet requiredAddressThe depositing wallet. It pays the transaction fee.
asset required"sol" | "usdc"Which asset.
amount requiredbase unitsHow much to deposit. Above 0 and at most 2^48 - 1.

The response is a Built:

FieldTypeDescription
transaction requiredbase64An unsigned v0 transaction with the wallet as fee payer.
lastValidBlockHeight requiredintegerThe block height after which this transaction can no longer land.
amount requiredbase unitsDeposit: what leaves the wallet. Withdraw: what is burned.
fee requiredbase unitsThe withdraw fee. 0 for a deposit.
receive requiredbase unitsDeposit: 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.

bash
curl "$HUSH_API/v1/build/deposit" \
  -H 'Content-Type: application/json' \
  -d '{"wallet":"wQ7CtxeMw1WHo6Ho3keSr7xYatte8HxuEYbJ1ELrE75","asset":"usdc","amount":"500000000"}'
json
{
  "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.

FieldTypeDescription
wallet requiredAddressThe withdrawing wallet. It pays the transaction fee.
asset required"sol" | "usdc"Which asset.
amount requiredbase unitsHow 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.

bash
curl "$HUSH_API/v1/build/withdraw" \
  -H 'Content-Type: application/json' \
  -d '{"wallet":"wQ7CtxeMw1WHo6Ho3keSr7xYatte8HxuEYbJ1ELrE75","asset":"usdc","amount":"500000000"}'
json
{
  "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.

MethodsgetAccountInfo, getMultipleAccounts, getBalance, getTokenAccountBalance, getLatestBlockhash, getMinimumBalanceForRentExemption, getSignatureStatuses, getEpochInfo, getSlot, getBlockHeight, simulateTransaction
BatchUp to 10 requests in one body
Body sizeUp to 64 KiB
Rate120 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:

FieldTypeDescription
error requiredobjectThe envelope.
error.code requiredErrorCodeOne of the codes below. Branch on this.
error.message requiredstringA sentence that can be shown to a person.
error.retryable requiredbooleanWhether 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.fieldErrorsobjectWith VALIDATION_ERROR: each rejected field and why.
error.programErrorobjectWhen a program refused the transaction.
error.programError.programId requiredAddressThe program that refused.
error.programError.name requiredstringIts error's name.
error.programError.numberintegerIts error's number.
error.retryAfterSecondsintegerWith RATE_LIMITED: how long to wait.
error.requestIdstringAn id for this request, to quote when reporting a problem.
bash
curl "$HUSH_API/v1/build/deposit" \
  -H 'Content-Type: application/json' \
  -d '{"wallet":"wQ7CtxeMw1WHo6Ho3keSr7xYatte8HxuEYbJ1ELrE75","asset":"usdc","amount":"0"}'
json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Check the highlighted fields.",
    "retryable": false,
    "stage": "validation",
    "fieldErrors": { "amount": ["Must be greater than zero."] }
  }
}

Error codes

CodeStatusRaised when
VALIDATION_ERROR400A path, query or body value doesn't match its type. fieldErrors names each one.
UNAUTHORIZED401The request needs a session it doesn't carry. No current endpoint needs one.
ORIGIN_NOT_ALLOWED403A browser request came from an origin the API doesn't accept.
NOT_FOUND404No route at this path, or no transaction with this signature.
PROGRAM_UNAVAILABLE409The program isn't on this network yet, so nothing can be built or relayed.
CONFIGURATION_REQUIRED409The service is still waiting for its configuration.
IDEMPOTENCY_CONFLICT409The same request was already made.
TRANSACTION_EXPIRED409The transaction's blockhash expired before it landed. Build and sign again.
PAYLOAD_TOO_LARGE413The request body is too large. The JSON-RPC relay takes 64 KiB.
UNSUPPORTED_MEDIA_TYPE415A POST body that isn't application/json.
SIMULATION_FAILED422A submitted transaction failed the network's simulation, or its bytes are not a transaction. The message carries the network's reason.
CHAIN_REFUSED422The network refused the submitted transaction.
RATE_LIMITED429Too many requests. retryAfterSeconds says how long to wait.
INTERNAL_ERROR500The request could not be completed.
UPSTREAM_UNAVAILABLE502The network RPC behind the API is not answering.
ACCOUNT_NOT_SET_UP409The wallet has no Hush account for this asset. Set up, then build again.
RECIPIENT_NOT_SET_UP409The recipient has no Hush account for this asset, so a send can't reach them.
INSUFFICIENT_FUNDS422The wallet holds less SOL or USDC than the deposit, or the Hush account's public balance is below the withdraw.
AMOUNT_TOO_LARGE400The amount is above 2^48 - 1 base units.
PENDING_LIMIT_REACHED409The account's pending balance holds its maximum number of credits. Its owner applies, then it can take a deposit again.