Skip to content

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

MethodReturns
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:

FieldMeaning
providerIntegrationProvider
nameDisplay name from the payment method
iconIcon URL, or null
isInstalledExtension is visible on this page (window globals / EIP-6963)
injectedNamespacesNamespaces the installed extension covers (eip155, solana, bip122). Empty if not installed
supportsWalletConnectWalletConnect is offered for this wallet on this device. false when the wallet uses a browse deeplink instead
transportsTransports usable right now, in the order the SDK offers them (injected and/or walletconnect)
isPopupConnectionInjected connect for this wallet opens a popup
isDeepLinkConnectionThis device opens the Swapped checkout URL in the wallet app (for example Phantom / Coinbase Wallet on mobile; MetaMask / Bitget on iOS)
qrScanTargetHow 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.