Skip to main content
Some offers only settle to wallets that the issuer has allowlisted. Superstate assets work this way, and the same allowlists are what make permissioned Uniswap pools and RWA lending markets available to your users. authorizeWallet does both halves of that in one call: it proves the user controls the wallet by having them sign a challenge, then registers the address against the offer, broadcasting an allowlist transaction if the contract requires one.
The flow involves two identities. The CoinList session (from OAuth) identifies who is investing, and the wallet is where assets are delivered. Allowlisting is what links them, which is why the user signs a message before they can transact.

Prerequisites

  • A completed OAuth session with a working CoinListProvider
  • A connected wallet. Wallet selection and connection are your app’s responsibility - the SDK operates on an already-connected EvmWallet.

Authorize a wallet

authorizeWallet is idempotent. If the wallet is already authorized it returns success immediately without prompting the user, so it is safe to call at the start of every session. Flow-level failures come back as { type: "error" } rather than throwing.

Parameters

Progress phases

The phases are emitted in order. Two of them open a wallet popup: checking-authorizationrequesting-challengesigning-message (wallet popup)submitting-signaturebroadcasting-transaction (wallet popup, only when the contract needs an allowlist transaction)awaiting-confirmationverifying-authorization

Error steps

WalletAuthorizationError is tagged by the step that failed, so you can tell a user rejection apart from an infrastructure problem. The signing and broadcast steps carry a WalletError cause, which distinguishes user_rejected from insufficient_funds, contract_reverted, and timeout. See Errors and edge cases for the full breakdown and for guidance on which are worth retrying.

Underlying endpoints

authorizeWallet wraps three Frontline API endpoints. Use them directly only if you are not using the React SDK.

Next steps

Swap flow

The full on-chain purchase flow, with authorization as step 3.

Errors and edge cases

Every error shape the SDK flows return, and how to handle them.