API Reference
The 1auth SDK provides everything you need to add passkey authentication and transaction signing to your app.
- React components - Drop-in components that work standalone, no viem or wagmi required
- Client API - Full control over auth flows, signing, and intent execution
- Viem/Wagmi integration - Optional adapters for existing web3 apps
Installation
npm
npm install @rhinestone/1authQuick Links
Client
Core SDK classes for authentication and transaction signing.
- OneAuthClient - Main SDK client for auth, signing, and intents
- Sign in with 1auth - Passkey authentication flow
- PayButton - One-click payment component
React
React components and hooks for building passkey-powered UIs.
- React Components & Hooks - PayButton, BatchQueue, useBatchQueue
Utilities
Helper functions for signing and verification.
- signTypedData - EIP-712 typed data signing
Basic Example
import { OneAuthClient } from '@rhinestone/1auth';
const client = new OneAuthClient({
providerUrl: 'https://passkey.1auth.box',
});
// Authenticate
const auth = await client.authWithModal();
if (auth.success) {
console.log('Logged in as:', auth.username);
}
// Send a transaction
const result = await client.sendIntent({
username: auth.username,
targetChain: 8453,
calls: [{ to: '0x...', value: parseEther('0.1') }],
});