DZapClient is a singleton — one instance per app. All SDK calls flow through it.
Get an instance
getInstance() returns the same singleton across calls. The first call wins for apiKey and rpcUrlsByChainId — subsequent calls reuse those.
Public methods
Each is documented in the dedicated pages: Trade, Zap, Approvals, Tokens & Balances, Utilities.
Errors
The SDK doesn’t throw a dedicated error class. Execution methods (trade, zap, tradeGasless, approve, sign, …) resolve (not reject) with a result object carrying status/code/errorMsg instead of throwing:
getTradeQuotes, getZapQuote, getAllTokens, …) call the REST API directly and can reject with a raw Axios error on network/HTTP failure — wrap those in try/catch if you need to handle that case explicitly.
See Error Codes for the full StatusCodes/TxnStatus catalog.