Appearance
@swapped/connect-sdk / wallet-verification / WalletVerificationWallets
Interface: WalletVerificationWallets
Defined in: src/modules/wallet-verification/wallets/wallets.module.ts:117
Methods
cancelPairing()
cancelPairing():
Promise<boolean>
Defined in: src/modules/wallet-verification/wallets/wallets.module.ts:281
Abort an in-flight WalletConnect pairing and clear a pending QR. Returns whether a pairing was actually cancelled.
Returns
Promise<boolean>
connect()
connect(
request):Promise<WalletConnection|null>
Defined in: src/modules/wallet-verification/wallets/wallets.module.ts:194
Optional explicit connect before WalletVerificationWallets.verify. verify() connects on its own when needed and reuses an existing injected connection for the requested network.
Parameters
request
Returns
Promise<WalletConnection | null>
destroy()
destroy():
void
Defined in: src/modules/wallet-verification/wallets/wallets.module.ts:1307
Stop the injected-wallet detector and release the popup helper. createWalletVerification calls this from WalletVerificationClient.destroy.
Returns
void
getAvailable()
getAvailable(
options?):Promise<WalletVerificationAvailableWallet[]>
Defined in: src/modules/wallet-verification/wallets/wallets.module.ts:173
Signature wallets the partner can offer, intersected with GET /wallet-verifications/integrations when that call succeeds. The integrations list is cached for 10 minutes. Uses the page detector (extensions / EIP-6963), not checkout payment methods.
Parameters
options?
network?
Keep wallets that support this family (eip155 for evm, solana for solana). Omit to list all signature wallets.
Returns
Promise<WalletVerificationAvailableWallet[]>
Example
ts
const evm = await client.wallets.getAvailable({ network: 'evm' })
// evm[0].provider === 'phantom', evm[0].isInstalled === truegetConnections()
getConnections():
Promise<WalletConnection[]>
Defined in: src/modules/wallet-verification/wallets/wallets.module.ts:248
Gateway connections already approved on this page (injected / WalletConnect). WalletVerificationWallets.verify reuses a matching connection when walletId is omitted.
Returns
Promise<WalletConnection[]>
prepareVerify()
prepareVerify(
request):Promise<PreparedWalletVerification>
Defined in: src/modules/wallet-verification/wallets/wallets.module.ts:321
QR-first start: create a pending record (address required), then emit a WalletConnect or browse QR. Resolves when the QR is ready (or immediately if the pair is already verified).
Finish with PreparedWalletVerification.wait, the onVerified / onError callbacks, or WalletVerificationWallets.verify (prepared or verificationId) to switch transport.
Parameters
request
PrepareWalletVerificationRequest
Returns
Promise<PreparedWalletVerification>
requiresDeepLink()
requiresDeepLink(
provider):boolean
Defined in: src/modules/wallet-verification/wallets/wallets.module.ts:265
Whether this wallet opens the Swapped verify page in its in-app browser on this device (Phantom / Coinbase Wallet on mobile; MetaMask / Bitget on iOS). Those wallets need address and onDeeplinkUrl on WalletVerificationWallets.verify.
Parameters
provider
Returns
boolean
signMessage()
signMessage(
request):Promise<string>
Defined in: src/modules/wallet-verification/wallets/wallets.module.ts:297
Sign an arbitrary message through the gateway. Prefer WalletVerificationWallets.verify, which signs challenge.message for you.
Parameters
request
Returns
Promise<string>
supportsWalletConnect()
supportsWalletConnect(
provider):boolean
Defined in: src/modules/wallet-verification/wallets/wallets.module.ts:273
Whether WalletConnect pairing is offered for this wallet on this device. False for browse-deeplink wallets (e.g. Phantom).
Parameters
provider
Returns
boolean
verify()
verify(
request):Promise<WalletVerification>
Defined in: src/modules/wallet-verification/wallets/wallets.module.ts:384
One-shot signature verification: create → connect → sign challenge.message → /proof → wait until terminal. Iframe wallets do that in one verifySignature RPC. Popup wallets (Trust injected) only connect and sign in the tab; this page creates, proofs, and waits. Deeplink wallets (Phantom / Coinbase / MetaMask iOS / Bitget iOS) create here, emit onDeeplinkUrl, and wait on this page.
Pass prepared from WalletVerificationWallets.prepareVerify or verificationId to reuse a pending record instead of creating again.
Invalid proof keeps status pending; call verify() again with the same customerId / address / network to re-sign that record. failed / expired need a new verification (same call still works - the server issues a new id).
Only one verify() (wallets or Coinbase) may run on this client at a time (ConnectSdkErrorCode.WALLET_VERIFICATION_IN_PROGRESS), except verify({ prepared }) which takes over that prepare session.
Parameters
request
Returns
Promise<WalletVerification>
Throws
ConnectSdkError WALLET_SIGNATURE_REJECTED when the user cancels the sign prompt.
Throws
ConnectSdkError WALLET_CONNECT_REJECTED when they cancel connect / pairing.
Throws
ConnectSdkError WALLET_VERIFICATION_ADDRESS_MISMATCH when the connected wallet is not the claimed address.