Prerequisites
- A browser application served over HTTPS. The hosted provider does not accept plain
http://localhost; use local HTTPS for development. - An application and its domains registered in the Dashboard.
- A device or browser that supports passkeys.
1
Install the SDK
2
Configure application credentials
Create a JWT signing key in the Dashboard, then follow the Embedded wallet tab in Sponsorship setup to implement two same-origin backend endpoints:
GET /api/sponsorship/access-tokenauthenticates your app and project.POST /api/sponsorship/extension-tokenauthorizes sponsorship for the intent.
Application credentials are required for every intent, even when the user
pays. Without
sponsorship configured, sendIntent returns
MISSING_APP_CREDENTIALS.3
Initialize the client
Create
oneauth.ts using the shared client initialization. Replace my-app with your registered client ID and point sponsorship at the endpoints above. Reuse its exported oneAuth client in the next step.Passkeys are created and used in your page. Each hostname has its own passkey and smart-account namespace by default. See Passkeys and domains before sharing accounts across subdomains.4
Send your first transaction
Call There are no
mintTestToken() from a button in your browser application. Authentication creates a wallet for a new user or signs in to an existing one; the user then authorizes the mint with their passkey.tokenRequests: the call mints tokens directly to the account, so nothing needs to be sourced or bridged. Sponsorship covers the fees; required fails rather than falling back to a user-paid transaction.Expected outcome
After the transaction completes, your account receives 1 mUSD on Base Sepolia.closeOn: "completed" keeps the dialog open until completion, and the example logs the intent ID. Inspect your account on Base Sepolia’s explorer to verify the mint.
Next steps
- Send a transaction: deliver tokens to a target chain before executing a call.
- Sign up and sign in: restore sessions and handle returning users.
- Ecosystem: connect the wallet to viem or wagmi.