Appearance
Availability
Pair session wallet payment methods with what this device can actually use.
These are wallets the user can connect — not already-connected instances. After connect, read Connected wallets. How to open a wallet: Connect wallet.
getAvailable loads wallet payment methods for the current session (cached, or fetched if they are not loaded yet) and returns every wallet.
Methods
| Method | Returns |
|---|---|
getAvailable() | Promise<AvailableWallet[]> |
watchAvailability(listener) | Unsubscribe. Fires when install / host detection changes |
requiresDeepLink(provider) | true when this device opens Swapped inside the wallet app instead of WalletConnect |
supportsWalletConnect(provider) | true when WalletConnect is offered for this wallet on this device |
Example
ts
const wallets = await client.wallets.getAvailable();
const off = client.wallets.watchAvailability(() => {
void client.wallets.getAvailable().then(next => {
// re-render from `next`
});
});
// later
off();Pass { forceRefetch: true } to bypass the payment-methods cache.
Each AvailableWallet:
| Field | Meaning |
|---|---|
provider | IntegrationProvider |
name | Display name from the payment method |
icon | Icon URL, or null |
isInstalled | Extension is visible on this page (window globals / EIP-6963) |
injectedNamespaces | Namespaces the installed extension covers (eip155, solana, bip122). Empty if not installed |
supportsWalletConnect | WalletConnect is offered for this wallet on this device. false when the wallet uses a browse deeplink instead |
transports | Transports usable right now, in the order the SDK offers them (injected and/or walletconnect) |
isPopupConnection | Injected connect for this wallet opens a popup |
isDeepLinkConnection | This device opens the Swapped checkout URL in the wallet app (for example Phantom / Coinbase Wallet on mobile; MetaMask / Bitget on iOS) |
qrScanTarget | How to scan a desktop connect QR: 'camera' (Phantom, Coinbase), 'wallet-app' (WalletConnect), or null if the wallet is not in the SDK config |
transports is empty when neither injected nor WalletConnect is usable right now. A wallet can still be listed from payment methods; isDeepLinkConnection is the other path (see Connect wallet).
The payment-methods API can list a provider the SDK does not support. Connecting it throws WALLET_NOT_SUPPORTED.