Skip to content

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

Type Alias: VerifyWalletSignatureRequest ​

VerifyWalletSignatureRequest = object & Omit<ConnectWalletRequest, "provider" | "namespaces">

Defined in: src/types/wallet-verification.types.ts:361

Input for WalletVerificationWallets.verify. Connect options (transport, onUri, force, …) come from ConnectWalletRequest except provider / namespaces - the host always connects the namespace for VerifyWalletSignatureRequest.network.

Type Declaration ​

address? ​

optional address?: string

Address to verify. Omit on injected / WalletConnect / popup to use the connected account for VerifyWalletSignatureRequest.network. Required for browse-deeplink wallets. If passed and the connected wallet is a different account, verify() throws WALLET_VERIFICATION_ADDRESS_MISMATCH and does not submit proof.

Example ​

ts
`'0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B'`

chainId? ​

optional chainId?: ChainId

EVM only: chain to request at connect time.

customerEmail? ​

optional customerEmail?: string

Optional end-user email. Forwarded to the API on create.

Example ​

customerId ​

customerId: string

Merchant identifier for the end user. Combined with address this is the reuse key - a verified pair returns status: 'verified' without prompting the wallet.

Example ​

ts
`'user-1234'`

force? ​

optional force?: boolean

WalletConnect only. Cancel any in-flight pairing before starting a new one.

forcePopup? ​

optional forcePopup?: boolean

Always run this injected connect / sign in the Swapped popup.

network ​

network: WalletVerificationNetwork

Chain family to verify. Signature today: evm and solana.

Example ​

ts
`'evm'`

onDeeplinkUrl? ​

optional onDeeplinkUrl?: (payload) => void

Browse URL that opens the Swapped verify page inside a wallet in-app browser (Phantom, Coinbase, MetaMask iOS, Bitget iOS). Distinct from VerifyWalletSignatureRequest.onUri, which is a WalletConnect wc: URI.

Parameters ​

payload ​
provider ​

IntegrationProvider

url ​

string

Returns ​

void

onUri? ​

optional onUri?: ConnectWalletRequest["onUri"]

WalletConnect pairing callback so the consumer can render a QR (uri) and/or open a mobile deep link (deeplinkUrl).

orderId? ​

optional orderId?: string

Merchant order reference (metadata only).

Example ​

ts
`'order-9876'`

popupIfUnavailable? ​

optional popupIfUnavailable?: boolean

If the iframe cannot see this extension, open a popup instead of failing.

prepared? ​

optional prepared?: PreparedWalletVerification

Finish a WalletVerificationWallets.prepareVerify session. Cancels pairing / the deeplink wait and signs the same pending record.

provider ​

provider: IntegrationProvider

Wallet the user picked from WalletVerificationWallets.getAvailable.

Example ​

ts
`IntegrationProvider.Phantom`

signal? ​

optional signal?: AbortSignal

Abort the merchant-page wait after a deeplink QR is shown (modal close). Throws ConnectSdkErrorCode.WALLET_VERIFICATION_CANCELLED.

transport? ​

optional transport?: WalletTransport

'injected' or 'walletconnect'. Default: installed extension → injected, else WalletConnect. Browse-deeplink wallets that are not installed take the deeplink path.

verificationId? ​

optional verificationId?: string

Resume a pending record (GET then connect / sign / proof). Ignored when VerifyWalletSignatureRequest.prepared is active.

Example ​

ts
`'b6f3c2a1-0000-4000-8000-000000000001'`

walletId? ​

optional walletId?: WalletId

Reuse this existing gateway connection instead of pairing again.

Example ​

ts
`'metamask:wc:topic'`

webhookUrl? ​

optional webhookUrl?: string

Optional override of the partner default webhook (server-to-server).

Example ​

ts
`'https://merchant.example.com/webhooks/wallet-verification'`

Example ​

ts
await client.wallets.verify({
  network: 'evm',
  customerId: 'user-1234',
  provider: IntegrationProvider.Phantom,
  address: '0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B', // optional
  onUri: ({ uri, deeplinkUrl }) => showQr(uri, deeplinkUrl),
  onDeeplinkUrl: ({ url }) => showQr(url),
})