Setup
Shared listener (Socket.IO)
The event stream is served over Socket.IO. The listener below resolves once a settlement is terminal (completed / dead) for a given wallet. Both examples import it. Install the client once:
listen.ts
Shared quote helper
The deposit address comes from a Mayan quote withmpsDeposit enabled, not a separate API call. The helper below fetches a quote and returns the mpsDepositAddress (the deterministic address on the quoteβs source chain). Both examples import it.
mps-quote.ts
Base (EVM): deposit USDC on Base
The user sends ~5 USDC to the quoteβs deposit address on Base; itβs settled as USDC to your destination wallet on Arbitrum.evm-base.ts
Solana: deposit USDC on Solana
A quote from a Solana source returns a Solana vault as itsmpsDepositAddress. The user sends ~5 USDC to it on Solana; itβs settled as USDC to your destination wallet on Arbitrum.
solana.ts
The status chain differs by source chain. EVM runs
pending_deploy β deploying β pending_swap β swapping β completed; Solana runs pending_settle β settling β completed. See Swap Statuses for the full lifecycle and the error field.