Types
DestinationConfig
Destination tokens
By default every deposit is delivered as USDC on the destination chain. Setdestination.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.
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, butETHonly on Ethereum/Base,BNBon BNB, andSOLon 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 theonDepositEvent 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 theonramp: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 theuaProjectId config option.
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. Setnotifications: 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
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.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 asonramp:* events. Zero-config: the SDK ships a default RampNow key, and @rampnow/sdk loads lazily only when the onramp opens.
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.
Recovery
Recover funds that are stuck in the intermediary wallet (e.g., due to failed sweeps).Refund (Experimental)
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 extendDepositSDKError:
Back to Quickstart
Installation, quickstart, and usage patterns.
