Skip to content

@swapped/connect-sdk / wallet-verification / WalletVerificationCoinbase

Interface: WalletVerificationCoinbase ​

Defined in: src/modules/wallet-verification/coinbase/coinbase.module.ts:65

Coinbase exchange_oauth verification. There is no /proof and no wallet connect/sign - Coinbase posts the auth code to Swapped, then the browser lands on redirectUrl (or the Swapped close-tab page).

Example ​

ts
await client.coinbase.startVerification({
  address: '0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B',
  network: 'evm',
  customerId: 'user-1234',
})
const verification = await client.coinbase.openVerificationTab()

Methods ​

cancelVerification() ​

cancelVerification(): void

Defined in: src/modules/wallet-verification/coinbase/coinbase.module.ts:299

Abort an in-flight WalletVerificationCoinbase.openVerificationTab wait, close the Coinbase tab, and release the in-flight lock so startVerification() can run again.

Returns ​

void


completeVerification() ​

completeVerification(verificationId?): Promise<WalletVerification>

Defined in: src/modules/wallet-verification/coinbase/coinbase.module.ts:258

After Coinbase in redirect mode, the browser lands on redirectUrl: https://merchant.example.com/wallet-verified?verificationId=b6f3…&status=verified

Resolves verificationId from the argument, then ?verificationId=, then session storage (same-tab persist only). status is a hint only. Waits in the gateway iframe until verified / failed / expired.

Parameters ​

verificationId? ​

string

Returns ​

Promise<WalletVerification>

Throws ​

ConnectSdkError WALLET_VERIFICATION_NOT_FOUND when no id is available.


destroy() ​

destroy(): void

Defined in: src/modules/wallet-verification/coinbase/coinbase.module.ts:311

Close any open Coinbase tab and abort an in-flight wait. createWalletVerification calls this from WalletVerificationClient.destroy.

Returns ​

void


openVerificationTab() ​

openVerificationTab(): Promise<WalletVerification>

Defined in: src/modules/wallet-verification/coinbase/coinbase.module.ts:179

Open Coinbase in a new tab from a user gesture and wait on this page until verified / failed / expired. If the user closes the tab, wait a short grace period for a terminal status, then cancel.

Returns ​

Promise<WalletVerification>

Throws ​

ConnectSdkError WALLET_VERIFICATION_NOT_STARTED when startVerification() has not produced a pending record.

Throws ​

ConnectSdkError WALLET_POPUP_BLOCKED when the tab is blocked.

Throws ​

ConnectSdkError WALLET_VERIFICATION_CANCELLED when WalletVerificationCoinbase.cancelVerification runs.


startVerification() ​

startVerification(request): Promise<WalletVerification>

Defined in: src/modules/wallet-verification/coinbase/coinbase.module.ts:94

Create method: 'exchange_oauth'. Does not open Coinbase in new-tab mode - call WalletVerificationCoinbase.openVerificationTab from a click. redirect mode assigns window.location to the authorization URL; finish with WalletVerificationCoinbase.completeVerification.

Returns immediately if that customerId + address is already verified (no tab / redirect).

Only one verification may run on this client at a time.

Parameters ​

request ​

StartCoinbaseVerificationRequest

Returns ​

Promise<WalletVerification>