Appearance
@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?
optionaladdress?: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?
optionalchainId?:ChainId
EVM only: chain to request at connect time.
customerEmail?
optionalcustomerEmail?:string
Optional end-user email. Forwarded to the API on create.
Example
ts
`'[email protected]'`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?
optionalforce?:boolean
WalletConnect only. Cancel any in-flight pairing before starting a new one.
forcePopup?
optionalforcePopup?: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?
optionalonDeeplinkUrl?: (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
url
string
Returns
void
onUri?
optionalonUri?:ConnectWalletRequest["onUri"]
WalletConnect pairing callback so the consumer can render a QR (uri) and/or open a mobile deep link (deeplinkUrl).
orderId?
optionalorderId?:string
Merchant order reference (metadata only).
Example
ts
`'order-9876'`popupIfUnavailable?
optionalpopupIfUnavailable?:boolean
If the iframe cannot see this extension, open a popup instead of failing.
prepared?
optionalprepared?: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?
optionalsignal?:AbortSignal
Abort the merchant-page wait after a deeplink QR is shown (modal close). Throws ConnectSdkErrorCode.WALLET_VERIFICATION_CANCELLED.
transport?
optionaltransport?:WalletTransport
'injected' or 'walletconnect'. Default: installed extension → injected, else WalletConnect. Browse-deeplink wallets that are not installed take the deeplink path.
verificationId?
optionalverificationId?:string
Resume a pending record (GET then connect / sign / proof). Ignored when VerifyWalletSignatureRequest.prepared is active.
Example
ts
`'b6f3c2a1-0000-4000-8000-000000000001'`walletId?
optionalwalletId?:WalletId
Reuse this existing gateway connection instead of pairing again.
Example
ts
`'metamask:wc:topic'`webhookUrl?
optionalwebhookUrl?: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),
})