A secure, user-friendly passkey wallet for NEAR blockchain applications. Built on WebAuthn with no popups, no seed phrases, and recovery through TouchID/FaceID across all your devices.
Web3Authn is an embedded wallet SDK that makes blockchain applications feel like native apps. Users sign in with their fingerprint or face, and their keys are automatically synced across devices through iCloud and Google Password Manager.
For users: No more seed phrases to write down, no browser extensions to install. Just TouchID/FaceID.
For developers: A simple SDK that handles all the complex cryptography, key management, and blockchain interactions. Focus on building your app, not wrestling with wallets.
Traditional browser wallets interrupt your UX with popups and extension prompts. Web3Authn embeds directly into your application with confirmation modals that match your design.
Users create a wallet with a single biometric prompt—no seed phrases, no downloads, no separate apps.
Passkeys sync automatically through iCloud (Safari) and Google Password Manager (Chrome). Users who log in on a new device automatically have access to their wallet.
Uses VRF-backed challenges verified on-chain, eliminating the need for centralized authentication servers. No single point of failure.
You control the UX, the branding, and the flow. The SDK provides building blocks—you decide how they fit together.
Think of Web3Authn like authentication-as-a-service, but for blockchain:
- User clicks "Sign in with passkey"
- Browser shows TouchID/FaceID prompt
- SDK creates a wallet and stores encrypted keys locally
- User can now sign blockchain transactions with their biometric
Behind the scenes, the SDK uses WebAuthn (the same standard as 1Password and GitHub) to derive blockchain signing keys. Keys are encrypted at rest and only decrypted in isolated Web Workers.
Web3Authn is an embedded wallet with strong security guarantees:
- Origin isolation: Keys run in a cross-origin iframe, protected even if your app is compromised
- Worker-based crypto: Private keys never touch the main JavaScript thread
- VRF challenges: On-chain verification without centralized auth servers
- Shamir 3-pass: Optional session-like UX without sacrificing security
See Architecture Documentation for details.
Install build tools (only needed for SDK development, not for using the published package):
# Install pnpm
npm install -g pnpm
# Install Rust and wasm-pack (for WASM modules)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install wasm-pack
# Install mkcert (for local HTTPS development)
brew install mkcert # macOS
# or your OS equivalentVerify installations:
node --version
pnpm --version
rustc --version
wasm-pack --version
mkcert -versionClone and build the SDK:
# Install dependencies and build everything
pnpm run install-allThis command:
- Installs all workspace dependencies
- Compiles Rust WASM modules (signer and VRF workers)
- Builds the TypeScript SDK
- Links packages for local development
Vite Example (React + TypeScript):
pnpm run devOpen https://localhost:5173 to see the wallet in action.
Relay Server (for account creation and Shamir 3-pass):
pnpm run serverThe relay runs on http://localhost:3000 and provides:
- Atomic NEAR account creation + passkey registration
- Shamir 3-pass for smooth login (no TouchID prompt on repeat logins)
- Automatic key rotation
web3-authn-sdk/
├── sdk/ # Core SDK package
│ ├── src/
│ │ ├── core/ # Framework-agnostic wallet logic
│ │ ├── react/ # React components and hooks
│ │ ├── wasm_signer_worker/ # Rust WASM for signing
│ │ └── wasm_vrf_worker/ # Rust WASM for VRF
│ └── README.md # SDK documentation
│
├── examples/
│ ├── vite/ # React example app
│ ├── relay-server/ # Node.js relay server
│ ├── relay-cloudflare-worker/ # Cloudflare Workers relay
│ └── tatchi-docs/ # Documentation site
│
└── README.md # This file
Development:
pnpm run install-all- Install all deps and build everythingpnpm run dev- Start example app (Vite + React)pnpm run server- Start relay server
Building:
pnpm run build:sdk- Build SDK and link to examplespnpm -C sdk build- Build SDK onlypnpm -C sdk dev- SDK watch mode
Testing:
pnpm -C sdk test- Run Playwright testspnpm -C sdk run type-check- TypeScript type checking
Web3Authn uses defense-in-depth to protect user keys:
The wallet runs in a separate security origin (e.g., wallet.example.com) from your application. Even if your app is compromised by XSS or malicious dependencies, attackers cannot access keys.
Private keys are decrypted only in Web Workers (isolated JavaScript contexts). They never exist in the main thread where UI code and third-party libraries run.
Combines WebAuthn's phishing-resistant authentication with VRF-backed challenges tied to fresh blockchain data. Smart contracts verify everything on-chain—no centralized auth servers needed.
Strict CSP prevents inline script execution and limits where code can load from, making XSS attacks significantly harder.
Read more: Security Model Documentation
Comprehensive documentation is available in examples/tatchi-docs/src/docs/:
Concepts (architecture and design):
- Goals of the Wallet - Why Web3Authn is designed this way
- Wallet Iframe Architecture - How origin isolation works
- Security Model - Defense-in-depth explained
- VRF Challenges - Serverless authentication
- Credential Scope Strategy - rpId configuration
- Nonce Manager - Blockchain transaction ordering
Guides (how-to and integration):
- Wallet Iframe Integration - Setup and configuration
- Relay Server Deployment - Node.js and Cloudflare Workers
- Self-Hosting - Deploy your own infrastructure
- Device Linking - Cross-device passkey sync
Users can trade, stake, and provide liquidity without managing seed phrases. Signatures happen with TouchID/FaceID.
One-click wallet creation reduces friction in onboarding. No extensions needed—works in any browser.
Players sign in with their fingerprint and start playing immediately. Keys sync across devices automatically.
Voting transactions are signed with biometrics. No seed phrase management for governance participants.
Full Support:
- Chrome 108+ (Desktop and Android)
- Safari 16+ (macOS and iOS)
- Edge 108+
With Fallbacks:
- Firefox 119+ (limited ROR support for wallet-scoped credentials)
Requirements:
- HTTPS (required for WebAuthn)
- Authenticator (TouchID, FaceID, Windows Hello, or hardware key)
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run tests:
pnpm -C sdk test - Run type checking:
pnpm -C sdk run type-check - Commit with clear messages
- Push and create a pull request
- Additional framework integrations (Vue, Svelte, Angular)
- More blockchain integrations beyond NEAR
- Documentation improvements
- Example applications
- Testing on different devices and browsers
MIT License - See LICENSE file for details.
- Documentation: ./examples/tatchi-docs/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Built on open standards:
- WebAuthn - W3C Web Authentication API
- NEAR Protocol - Blockchain platform
- WebAssembly and Web Workers - Browser security primitives