Skip to main content
Create a smart wallet and send your first transaction. Choose 1auth for managed passkey authentication and transaction approval, or use the SDK to control the signer and account integration yourself.

Prerequisites

You need:
  • A browser app served over HTTPS. The hosted provider does not accept plain http://localhost; see the local HTTPS options.
  • A 1auth app and JWT signing credentials from the Rhinestone dashboard.
  • Two same-origin server endpoints that issue sponsorship tokens. Follow the fee sponsorship guide to create them.
Keep JWT signing credentials on your server. In production, authenticate these endpoints and restrict their policies, budgets, and rate limits.Install 1auth and viem:
1

Initialize 1auth

Create a client in your browser app. Replace my-app with your app’s client ID:
The access-token URL receives a GET request and returns { token }. The extension-token URL receives a POST request containing { intentOp } and returns { token }. These are endpoints in your app, not hosted 1auth endpoints. Without working app credentials, sendIntent fails with MISSING_APP_CREDENTIALS.
1auth uses app-origin passkeys by default. The WebAuthn ceremony runs on your app’s exact origin, so different origins create different passkeys and smart accounts. Learn more in Choose your WebAuthn mode.
2

Authenticate the user

Call authentication from a user-facing control, such as a Sign in button. Do not start authentication automatically when the page loads.The mint function below verifies authentication before reading the session address:
3

Mint 1 mUSD

Continue the function by submitting a sponsored mint on Base Sepolia. Invoke it from a transaction button so the user chooses when to review and approve the transaction:
sendIntent waits for the completed status because closeOn is set explicitly. A timeout is not proof that an already submitted intent failed; keep its intent ID for status tracking instead of blindly submitting it again.

Expected outcome

The authenticated smart account receives 1 mUSD on Base Sepolia and can start with a zero balance. This works because the call creates a faucet token and does not require tokens to be sourced or bridged first. Fee sponsorship does not make every transaction funding-free; transactions that need assets still require those assets to be available.

Next steps

Send crosschain

Use the mUSD you minted in a crosschain transaction.

Add React components

Add managed wallet components to a React app.

Connect viem or wagmi

Use a passkey wallet client in an existing web3 app.