Skip to main content
The DepositClient provides full deposit functionality without React. Use it for server-side scripts, Node.js backends, or custom UI frameworks.

DepositClient

Constructor Config


Methods


Notifications (Headless)

Track each deposit through its lifecycle without any UI. Pass the onDepositEvent callback, or subscribe to the deposit:lifecycle event — both deliver the same normalized DepositLifecycleEvent, with a stable id across phase transitions (detected → processing → credited, or failed / below_threshold).
Lifecycle events fire client-side and best-effort — they are not a reliable server webhook. Don’t use them as the source of truth for crediting funds.

Fund from Wallet (Headless)

Let a user top up their deposit address from a connected browser wallet (MetaMask / Rabby / Phantom / any injected EIP-1193 or Solana wallet). The SDK discovers the wallet’s cross-chain balances, builds a plain transfer to the deposit address, and submits it through the wallet; the watcher then detects and sweeps it as usual. The browser wallet is a funding source only — it never becomes the Universal Account owner/signer. Balance discovery is zero-config (Particle’s hosted service — no Moralis key, proxy, or backend). Enable it on the client:

Flow

Detection Utilities

Framework-agnostic helpers for discovering and connecting injected wallets:
Balance discovery covers Ethereum, BNB Chain, Base, Arbitrum, and Solana. X Layer is not supported by the Moralis-backed service, so it is skipped during discovery — other supported chains are unaffected.

Onramp — Buy with Fiat (Headless)

Let a user buy crypto with fiat (card / Apple Pay / bank) via RampNow, delivered straight to the configured destination. Unlike Fund from Wallet, the purchase bypasses the deposit-address → watcher → sweeper pipeline — RampNow’s order events are the source of truth, forwarded by the SDK as onramp:* events. The onramp buys the destination token (USDC by default), matching the sweep — note RampNow supports a narrower token set than the sweep, so gate the “Buy” UI on isOnrampSupported() / isOnrampTokenSupported(token, chainId) (see Destination tokens). Onramp is a single flag — zero-config. The SDK ships with a default RampNow key, so there’s nothing to source; pass your own apiKey only to route purchases through your own RampNow partner account. The underlying @rampnow/sdk is loaded lazily (dynamic import()) only when the onramp is opened, so it never bundles into apps that don’t use it.
Onramp delivery is supported for Ethereum, BNB Chain, Base, Arbitrum, and Solana. X Layer is not supported — isOnrampSupported() returns false for it. Order events only flow in mode: 'overlay'; a redirect tab has no channel back to report progress.

Transaction History

Query the Universal Account’s transaction history. Results are cached (30s TTL, LRU) to avoid redundant API calls when paginating.

Page-Based Pagination

Filter by Token and Chain (Cursor-Based)

Single Transaction Lookup


Events

Subscribe to events using on / off:

Event Reference


Next Steps

React SDK

DepositProvider, hooks, and UI components.

Reference

Types, constants, and advanced topics.