npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lazerkit-webauthn

v1.0.0

Published

A powerful, flexible WebAuthn client SDK for passwordless authentication

Downloads

11

Readme

@lazerkit/webauthn-client

A powerful, flexible WebAuthn client SDK for passwordless authentication and non-custodial wallet management. Built on WebAuthn standards with support for passkey-based authentication on multiple blockchains.

Features

Passkey Authentication - Biometric security meets Web3. No passwords, no seed phrases—just seamless access with your device.

🔐 Non-Custodial Wallets - Users maintain complete control. Wallets are created instantly with passkey authentication.

Multi-Chain Support - Built-in support for Ethereum, Mantle, Base, and more EVM-compatible networks.

🛡️ Enterprise Security - Military-grade encryption with WebAuthn standard compliance.

🎨 UI Components - Ready-to-use React components or build your own with the headless SDK.

Installation

npm install @lazerkit/webauthn-client

Quick Start

Using the UI Provider

import { LazerkitProvider, useLazerkit } from '@lazerkit/webauthn-client';

function App() {
  const walletConfig = {
    rpcUrl: 'https://rpc.sepolia.mantle.xyz/',
    chainId: 5003,
    rpName: 'My App',
    rpId: window.location.hostname,
  };

  return (
    <LazerkitProvider rpcConfig={walletConfig}>
      <YourWalletComponent />
    </LazerkitProvider>
  );
}

function YourWalletComponent() {
  const {
    isLoggedIn,
    currentUser,
    walletInfo,
    balance,
    createPasskeyWallet,
    unlockPasskeyWallet,
    register,
  } = useLazerkit();

  return (
    <>
      {!isLoggedIn ? (
        <button onClick={() => register('username')}>
          Create Wallet
        </button>
      ) : (
        <div>
          <p>User: {currentUser?.username}</p>
          <p>Address: {walletInfo?.address}</p>
          <p>Balance: {balance} MNT</p>
        </div>
      )}
    </>
  );
}

Using the Headless SDK

import { WebAuthnClient } from '@lazerkit/webauthn-client/headless';

const client = new WebAuthnClient();

// Check support
if (WebAuthnClient.isSupported()) {
  const options = {
    challenge: new Uint8Array(32),
    rp: { name: 'My App', id: 'example.com' },
    user: {
      id: new Uint8Array(16),
      name: '[email protected]',
      displayName: 'User',
    },
    pubKeyCredParams: [
      { type: 'public-key', alg: -7 },
      { type: 'public-key', alg: -257 },
    ],
  };

  const credential = await client.register(options);
  console.log('Passkey registered:', credential);
}

API Reference

LazerkitProvider Props

interface PasskeyWalletConfig {
  rpcUrl: string;        // RPC endpoint for blockchain
  chainId?: number;      // Chain ID (default: Ethereum mainnet)
  rpName?: string;       // Relying Party name
  rpId?: string;         // Relying Party ID (defaults to hostname)
  storage?: IStorage;    // Custom storage implementation
  networks?: NetworkConfig[]; // Custom network configs
}

useLazerkit Hook

const {
  // Authentication
  isLoggedIn: boolean;
  currentUser: User | null;
  register: (username: string) => Promise<void>;
  authenticate: (username: string) => Promise<void>;
  logout: () => void;

  // Wallet
  passkeyWallet: PasskeyWallet | null;
  walletInfo: WalletInfo | null;
  balance: string | null;
  isWalletConnected: boolean;
  hasStoredWallet: boolean;

  // Wallet Actions
  createPasskeyWallet: (username: string) => Promise<void>;
  unlockPasskeyWallet: (username?: string) => Promise<void>;
  lockPasskeyWallet: () => void;
  deletePasskeyWallet: () => void;

  // Interactions
  signMessage: (message: string) => Promise<string>;
  sendEthTransaction: (toAddress: string, amountEth: string) => Promise<any>;
  refreshBalance: () => Promise<void>;
} = useLazerkit();

Supported Networks

  • Ethereum Mainnet - Chain ID: 1
  • Mantle Sepolia - Chain ID: 5003 (recommended for testing)
  • Base Sepolia - Chain ID: 84532
  • And more EVM-compatible networks

Exports

Main Entry Point

import {
  LazerkitProvider,
  useLazerkit,
  WebAuthnButton,
  WebAuthnModal,
  LazerkitUI,
  PasskeyWallet,
  WalletUI,
} from '@lazerkit/webauthn-client';

Headless SDK

import {
  WebAuthnClient,
  Base64,
  Validation,
  WebAuthnClientError,
  ERROR_CODES,
  ALGORITHMS,
} from '@lazerkit/webauthn-client/headless';

Browser Support

WebAuthn is supported in:

  • Chrome 67+
  • Firefox 60+
  • Safari 13+
  • Edge 18+

Check support with:

if (WebAuthnClient.isSupported()) {
  // Use WebAuthn
}

Security Considerations

  1. Always use HTTPS in production
  2. Validate on the backend - Verify credentials on your server
  3. Use consistent RP ID - Ensure RP ID matches your domain
  4. Handle errors gracefully - Provide user-friendly error messages
  5. Implement rate limiting - Protect against brute force attacks

Contributing

We welcome contributions! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

Support

For issues, feature requests, or questions:

Changelog

v1.0.0

  • Initial release
  • Passkey registration and authentication
  • Non-custodial wallet support
  • Multi-chain EVM support
  • React provider and hooks
  • UI components