Appearance
@swapped/connect-sdk / core / Wallets
Interface: Wallets
Defined in: src/modules/wallets/wallets.module.ts:114
Browser wallet connect / balances APIs.
Available on the client as client.wallets. Connection privileged actions go through the gateway iframe host; balances use the backend HTTP API.
Methods
cancelPairing()
cancelPairing():
Promise<boolean>
Defined in: src/modules/wallets/wallets.module.ts:475
Abort an in-flight WalletConnect pairing (clears pending QR).
Returns
Promise<boolean>
connect()
connect(
request):Promise<WalletConnection|null>
Defined in: src/modules/wallets/wallets.module.ts:398
Parameters
request
Returns
Promise<WalletConnection | null>
disconnect()
disconnect(
walletId):Promise<void>
Defined in: src/modules/wallets/wallets.module.ts:494
Parameters
walletId
string
Returns
Promise<void>
disconnectAll()
disconnectAll():
Promise<void>
Defined in: src/modules/wallets/wallets.module.ts:534
Returns
Promise<void>
disconnectProvider()
disconnectProvider(
provider):Promise<void>
Defined in: src/modules/wallets/wallets.module.ts:511
Parameters
provider
Returns
Promise<void>
getAddresses()
getAddresses():
WalletAccount&object[]
Defined in: src/modules/wallets/wallets.module.ts:580
Returns
WalletAccount & object[]
getAvailable()
getAvailable(
options?):Promise<AvailableWallet[]>
Defined in: src/modules/wallets/wallets.module.ts:293
Pair session wallet payment methods with page-detected installs + host transports. Fetches payment methods when they are not already cached.
Parameters
options?
forceRefetch?
boolean
Returns
Promise<AvailableWallet[]>
getBalances()
getBalances(
options?):Promise<WalletBalancesForWallet[]>
Defined in: src/modules/wallets/wallets.module.ts:589
Parameters
options?
forceRefetch?
boolean
Returns
Promise<WalletBalancesForWallet[]>
getCachedBalances()
getCachedBalances():
WalletBalancesForWallet[]
Defined in: src/modules/wallets/wallets.module.ts:562
Last balances snapshot used for getConnections({ sort: 'balanceDesc' }).
Returns
getConnection()
getConnection(
walletId):WalletConnection|null
Defined in: src/modules/wallets/wallets.module.ts:566
Parameters
walletId
string
Returns
WalletConnection | null
getConnections()
getConnections(
options?):WalletConnection[]
Defined in: src/modules/wallets/wallets.module.ts:554
Parameters
options?
sort?
Returns
getConnectionsByProvider()
getConnectionsByProvider(
provider):WalletConnection[]
Defined in: src/modules/wallets/wallets.module.ts:574
Parameters
provider
Returns
getConnectionState()
getConnectionState():
WalletsConnectionState
Defined in: src/modules/wallets/wallets.module.ts:862
Returns
getDeepLinkUrl()
getDeepLinkUrl(
provider):string|null
Defined in: src/modules/wallets/wallets.module.ts:355
Browse deeplink that opens the Swapped checkout in the wallet app.
Parameters
provider
Returns
string | null
getWalletBalance()
getWalletBalance(
walletId,options?):Promise<WalletBalance[]>
Defined in: src/modules/wallets/wallets.module.ts:619
Refresh balances for one wallet (all namespaces / networks) in a single /wallets/balances request. Concurrent callers share the in-flight promise.
Parameters
walletId
string
options?
forceRefetch?
boolean
Returns
Promise<WalletBalance[]>
isConnected()
isConnected(
provider):boolean
Defined in: src/modules/wallets/wallets.module.ts:570
Parameters
provider
Returns
boolean
openDeepLink()
openDeepLink(
provider):string|null
Defined in: src/modules/wallets/wallets.module.ts:372
Open the browse deeplink from the merchant window.
Parameters
provider
Returns
string | null
reconnect()
reconnect(
options?):Promise<WalletConnection[]>
Defined in: src/modules/wallets/wallets.module.ts:815
Re-hydrate from the iframe store. Pass { force: true } to re-talk to popup-routed extensions in a new popup.
Parameters
options?
force?
boolean
Returns
Promise<WalletConnection[]>
requiresDeepLink()
requiresDeepLink(
provider):boolean
Defined in: src/modules/wallets/wallets.module.ts:346
Parameters
provider
Returns
boolean
sendTransaction()
sendTransaction(
request):Promise<SendWalletTransactionResult>
Defined in: src/modules/wallets/wallets.module.ts:684
Parameters
request
Returns
Promise<SendWalletTransactionResult>
signMessage()
signMessage(
request):Promise<string>
Defined in: src/modules/wallets/wallets.module.ts:673
Parameters
request
Returns
Promise<string>
subscribe()
subscribe(
listener): () =>void
Defined in: src/modules/wallets/wallets.module.ts:854
Parameters
listener
(state) => void
Returns
() => void
supportsWalletConnect()
supportsWalletConnect(
provider):boolean
Defined in: src/modules/wallets/wallets.module.ts:350
Parameters
provider
Returns
boolean
switchChain()
switchChain(
walletId,chainId,options?):Promise<WalletConnection>
Defined in: src/modules/wallets/wallets.module.ts:782
Parameters
walletId
string
chainId
`eip155:${string}` | `solana:${string}` | `bip122:${string}`
options?
forcePopup?
boolean
popupIfUnavailable?
boolean
Returns
Promise<WalletConnection>
watchAvailability()
watchAvailability(
listener): () =>void
Defined in: src/modules/wallets/wallets.module.ts:390
Notify when page install detection or iframe visibility changes.
Parameters
listener
() => void
Returns
() => void
Properties
transfer
readonlytransfer:WalletsTransfer
Defined in: src/modules/wallets/wallets.module.ts:155
High-level deposit flows (direct / swap / bridge).