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

cryptoauthsso-sdk

v1.0.0

Published

Universal TypeScript SDK for CryptoAuthSSO

Readme

@cryptoauthsso/sdk

Universal TypeScript SDK for CryptoAuthSSO - Secure wallet authentication with email verification.

Installation

npm install @cryptoauthsso/sdk
# or
yarn add @cryptoauthsso/sdk

Quick Start

import { CryptoAuthSSO } from '@cryptoauthsso/sdk';

// Initialize with your API key
const cryptoGate = new CryptoAuthSSO({
  apiKey: 'your-api-key',
  baseUrl: 'https://api.cryptogate.dev' // optional, defaults to production
});

// Send verification code
await cryptoGate.auth.sendCode('[email protected]');

// Verify code and authenticate
const session = await cryptoGate.auth.verifyCode('[email protected]', '123456');

// Set session for wallet operations
cryptoGate.setSessionToken(session.session.token);

// Create a new wallet
const wallet = await cryptoGate.wallets.create('My Wallet');

// List wallets
const wallets = await cryptoGate.wallets.list();

// Sign a message
const signature = await cryptoGate.wallets.sign(wallet.wallet.id, 'Hello World');

Features

  • 🔐 Email-based authentication - No passwords required
  • 🎯 Universal compatibility - Works with React, Next.js, Vue, vanilla JS
  • 💼 Full wallet management - Create, list, sign, send transactions
  • 🔒 Secure by default - Encrypted storage and secure session management
  • 📱 Modern TypeScript - Full type definitions included

Authentication

Send Verification Code

const response = await cryptoGate.auth.sendCode('[email protected]');
console.log(response.message); // "Verification code sent"

Verify Code

const authResponse = await cryptoGate.auth.verifyCode('[email protected]', '123456');
console.log(authResponse.user); // User object
console.log(authResponse.session); // Session with token

Set Session Token

// Required for wallet operations
cryptoGate.setSessionToken(authResponse.session.token);

Wallet Management

Create Wallet

const response = await cryptoGate.wallets.create('My Ethereum Wallet', 'ethereum');
console.log(response.wallet.address); // 0x1234...

List Wallets

const response = await cryptoGate.wallets.list();
console.log(response.wallets); // Array of wallet objects

Sign Message

const response = await cryptoGate.wallets.sign(walletId, 'Message to sign');
console.log(response.signature); // Cryptographic signature

Send Transaction

const response = await cryptoGate.wallets.send(
  walletId,
  '0xrecipient...',
  '0.1', // ETH amount
  { gasLimit: 21000 }
);
console.log(response.transaction.txHash);

User Management

Get User Profile

const response = await cryptoGate.wallets.getProfile();
console.log(response.user); // User profile with wallet count

Get User Sessions

const response = await cryptoGate.wallets.getSessions();
console.log(response.sessions); // Active sessions

Error Handling

try {
  await cryptoGate.auth.sendCode('invalid-email');
} catch (error) {
  if (error.status === 400) {
    console.log('Invalid email format');
  }
  console.log(error.message); // Error description
}

Framework Examples

React

import { useState } from 'react';
import { CryptoAuthSSO } from '@cryptoauthsso/sdk';

const cryptoGate = new CryptoAuthSSO({ apiKey: 'your-key' });

function Login() {
  const [email, setEmail] = useState('');
  const [code, setCode] = useState('');
  const [step, setStep] = useState('email');

  const sendCode = async () => {
    await cryptoGate.auth.sendCode(email);
    setStep('verify');
  };

  const verifyCode = async () => {
    const session = await cryptoGate.auth.verifyCode(email, code);
    cryptoGate.setSessionToken(session.session.token);
    // User is now authenticated
  };

  return (
    <div>
      {step === 'email' ? (
        <div>
          <input value={email} onChange={(e) => setEmail(e.target.value)} />
          <button onClick={sendCode}>Send Code</button>
        </div>
      ) : (
        <div>
          <input value={code} onChange={(e) => setCode(e.target.value)} />
          <button onClick={verifyCode}>Verify</button>
        </div>
      )}
    </div>
  );
}

Next.js

// pages/api/auth/verify.ts
import { CryptoAuthSSO } from '@cryptoauthsso/sdk';

export default async function handler(req, res) {
  const cryptoGate = new CryptoAuthSSO({ 
    apiKey: process.env.CRYPTOGATE_API_KEY 
  });
  
  const { email, code } = req.body;
  
  try {
    const session = await cryptoGate.auth.verifyCode(email, code);
    res.json(session);
  } catch (error) {
    res.status(400).json({ error: error.message });
  }
}

Configuration

const cryptoGate = new CryptoAuthSSO({
  apiKey: 'your-api-key',           // Required: Your CryptoAuthSSO API key
  baseUrl: 'https://api.custom.com' // Optional: Custom API endpoint
});

License

MIT © CryptoAuthSSO Team