Skip to main content

Types

DestinationConfig

Destination tokens

By default every deposit is delivered as USDC on the destination chain. Set destination.token to deliver a different asset; the sweep converts each deposit into that token and the fiat onramp buys it directly. The token must be deliverable on the destination chain or the client throws a ConfigurationError.
Deliverable token × chain matrix: Deliverability mirrors the Universal Account’s routable primary assets (Base has no USDT route, for example). Use isSupportedDestinationToken(token, chainId) to check a combo at runtime.
X Layer is a deposit source only — the Universal Account has no X Layer primary tokens, so it cannot be used as a sweep destination.
Onramp note: RampNow’s fiat “Buy” supports a narrower set than the sweep — stablecoins on all chains, but ETH only on Ethereum/Base, BNB on BNB, and SOL on Solana. isOnrampSupported() / isOnrampTokenSupported(token, chainId) reflect this; gate “Buy” UI on them.

DetectedDeposit

SweepResult

RecoveryResult

RefundResult

DepositLifecycleEvent

Normalized, serializable view of a deposit at a single lifecycle phase — delivered by the onDepositEvent callback and the deposit:lifecycle event, and the basis for the notification UI. id is stable across phase transitions.

FundingConfig

Funding Types

OnrampConfig

OnrampOrder

The completed-order payload from RampNow, delivered by the onramp:complete event and exposed as lastOrder from useOnramp.

UATransaction

TransactionsResponse

TokenTransactionFilter

TokenTransactionsResponse

Other Types


Constants

CHAIN

Defaults

Chain Utilities

Wallet Detection Utilities

Framework-agnostic helpers for the Fund from Wallet feature — discover and connect injected browser wallets without React.

Advanced Topics

Custom Particle Credentials

You can provide your own Particle project ID via the uaProjectId config option.
uaProjectId only affects Universal Account operations (smart account initialization and asset queries). The intermediary wallet authentication (JWT + Auth Core session) always uses the SDK’s built-in credentials — this is by design and cannot be overridden.
This is useful if you want to handle your own app fees. If you use your own project ID, deposits are subject to a 1% fee going to Particle. Reach out to configure a custom rate and establish a revenue sharing model.

Destination Configuration

Change the sweep destination at runtime.
Throws ConfigurationError if the chain ID, address, or token is invalid — see the deliverable token × chain matrix.

Notifications

Surface deposit progress to your users. Set notifications: true on DepositProvider to auto-mount the toaster, build a custom UI with the useDepositNotifications hook, or go headless with the onDepositEvent callback / deposit:lifecycle event — all driven by the same DepositLifecycleEvent.

DepositNotificationsProps

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

Let users top up their deposit address from a connected browser wallet (MetaMask / Rabby / Phantom / any injected EIP-1193 or Solana wallet). The SDK discovers cross-chain balances, builds a transfer to the deposit address, and the watcher sweeps it as usual. Balance discovery is zero-config (Particle’s hosted service — no Moralis key, proxy, or backend). The browser wallet is a funding source only — it never becomes the Universal Account owner/signer.
When funding.enabled is set, DepositWidget automatically shows a “Receive | Fund from wallet” toggle. For a standalone surface use the FundFromWallet component, or call client.getWalletBalances() / client.fundFromWallet() directly — see the React SDK and Core SDK.

FundingConfig

Balance-source precedence: balanceProvider > apiKey (direct) > proxyUrl > hosted default. Balance discovery covers Ethereum, BNB Chain, Base, Arbitrum, and Solana; X Layer is not supported and is skipped during discovery.

Onramp

Let users buy crypto with fiat (card / Apple Pay / bank) via RampNow, delivered straight to the destination. Onramp bypasses the watcher/sweeper pipeline — RampNow’s order events are the source of truth and are forwarded as onramp:* events. Zero-config: the SDK ships a default RampNow key, and @rampnow/sdk loads lazily only when the onramp opens.
When onramp.enabled is set, DepositWidget automatically adds a “Buy” tab. For custom placement use OnrampButton, the useOnramp() hook, or the OnrampStatusToast popup — see the React SDK. Headless apps call client.openOnramp({ amount }) directly — see the Core SDK.
Supported chains: Ethereum, BNB Chain, Base, Arbitrum, and Solana. X Layer is not supported — isOnrampSupported() returns false and the “Buy” UI is disabled with an explanation.
Delivered token: Onramp always buys USDC, matching the token the sweep delivers to the destination.
Order events only flow in mode: 'overlay'. A redirect tab has no postMessage channel back, so there’s nothing to track (no activity-feed updates, no status toast).

Recovery

Recover funds that are stuck in the intermediary wallet (e.g., due to failed sweeps).
Or use the built-in UI:

Refund (Experimental)

Refund is experimental. Auto-refund is disabled by default.
Enable auto-refund to automatically return funds to the source chain when sweeps fail:

RefundConfig

Manual refund is always available regardless of the auto-refund setting:

Error Handling

All SDK errors extend DepositSDKError:

Back to Quickstart

Installation, quickstart, and usage patterns.