Install
The SDK is published as @dzapio/sdk. Latest stable: 2.0.44. Targets Node 16+ and modern browsers (see Browser bundler setup). It ships its own wallet libraries — there are no peer dependencies to install separately.
Version pinning
The SDK pins its wallet libraries to exact versions, not ranges:
If your app resolves a different viem, WalletClient becomes a structurally different type and
passing a signer stops typechecking — with an error that never mentions versions. Force a single
copy:The same applies to ethers@5.7.2 if you use the ethers adapter.
Browser bundler setup
The SDK pulls in @solana/web3.js, tonweb and ethers@5, which expect Node globals. In a stock
Vite or Next app the build fails or breaks at runtime until Buffer, global and process are
polyfilled.
Wallet adapters
The SDK accepts both viem and ethers.js signers.
Pass either as the signer field to dzap.trade(), dzap.zap(), etc.
Never put private keys in client code or commit them. Use a wallet provider (RainbowKit, ConnectKit, etc.) on the frontend; use a secrets manager on the backend.
Custom RPC URLs
The SDK ships with sensible defaults but you’ll want your own RPCs for production.
The first URL in each array is primary; subsequent URLs are fallbacks for read-quorum.
API key (optional)
API keys raise rate limits and unlock per-route configuration. See Authentication and Rate Limits.