@chipi-stack/chipi-passkey
v2.1.0
Published
Passkey authentication for Starknet wallets — WebAuthn, biometric login, and seedless key management
Downloads
257
Readme
@chipi-stack/chipi-passkey
WebAuthn passkey utilities for secure wallet encryption in Chipi SDK.
Features
- 🔐 WebAuthn/Passkey authentication for wallet encryption
- 🔑 PRF (Pseudo-Random Function) extension support for deterministic key derivation
- 🌐 Browser-based biometric authentication
- 🔄 Migration utilities for switching from PIN to passkey
Installation
npm install @chipi-stack/chipi-passkey
# or
pnpm add @chipi-stack/chipi-passkey
# or
yarn add @chipi-stack/chipi-passkeyUsage
Check Passkey Support
import {
isWebAuthnSupported,
hasWalletPasskey,
} from "@chipi-stack/chipi-passkey";
if (isWebAuthnSupported()) {
const hasPasskey = hasWalletPasskey();
console.log("Passkey available:", hasPasskey);
}Create Wallet with Passkey
import { createWalletPasskey } from "@chipi-stack/chipi-passkey";
const result = await createWalletPasskey("user-123", "[email protected]");
// result.encryptKey - Use this as wallet encryption key
// result.credentialId - Passkey credential ID
// result.prfSupported - Whether PRF extension is supportedAuthenticate with Passkey
import { getWalletEncryptKey } from "@chipi-stack/chipi-passkey";
// Prompts user for biometric authentication
const encryptKey = await getWalletEncryptKey();
// Use this encryptKey for transactionsReact Hooks
import { usePasskeySetup, usePasskeyAuth } from "@chipi-stack/chipi-passkey/hooks";
function WalletSetup() {
const { setupPasskey, isLoading } = usePasskeySetup();
const handleSetup = async () => {
const { encryptKey } = await setupPasskey("user-123", "[email protected]");
// Create wallet with encryptKey
};
}
function SendTransaction() {
const { authenticate } = usePasskeyAuth();
const handleSend = async () => {
const encryptKey = await authenticate();
// Use encryptKey for transaction
};
}What you can ship
- Passwordless wallet onboarding — users create wallets with a single biometric prompt
- Biometric login (Face ID, Windows Hello) — authenticate with device biometrics instead of passwords
- PIN-to-passkey migration — upgrade existing PIN-based wallets to passkey authentication
- Seedless key management — no seed phrases, no private key exposure
Have an idea? Tell us what you want to build
Requirements
- Modern browser with WebAuthn support
- HTTPS (required for WebAuthn)
- React 18+ (for hooks)
License
MIT
