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

@zynkah/privy-lib

v1.0.1

Published

A comprehensive React library for Privy authentication and wallet management with casino gaming features

Readme

@zynkah/privy-lib

A comprehensive React library for Privy authentication and wallet management with casino gaming features. This library provides a complete authentication and wallet management system built around Privy Auth with custom casino configurations and Smart Wallet support.

🚀 Features

  • 🔐 Authentication: Complete Privy Auth integration with casino-specific configurations
  • 💼 Wallet Management: Advanced wallet operations with smart wallet support
  • 🎮 Casino Integration: Gaming-specific authentication and wallet features
  • ⚡ Smart Wallets: Built-in support for Biconomy and other smart wallet providers
  • 🎨 UI Components: Pre-built React components for wallet operations
  • 🔧 Configuration: Flexible configuration system with builder patterns
  • 📱 Responsive: Mobile-first design for wallet interactions

📦 Installation

npm install @zynkah/privy-lib

Peer Dependencies

Make sure you have the required peer dependencies installed:

npm install react react-dom @privy-io/react-auth styled-components framer-motion valtio

🔧 Quick Setup

Basic Setup

import React from 'react'
import { PrivyProvider } from '@zynkah/privy-lib'

function App() {
  return (
    <PrivyProvider appId="your-privy-app-id">
      {/* Your app content */}
    </PrivyProvider>
  )
}

export default App

Advanced Configuration

import React from 'react'
import { PrivyProvider, ConfigBuilder } from '@zynkah/privy-lib'

const customConfig = new ConfigBuilder()
  .setAppearance({
    theme: 'dark',
    accentColor: '#6366f1'
  })
  .setLoginMethods(['email', 'wallet'])
  .setEmbeddedWallets({ createOnLogin: 'users-without-wallets' })
  .build()

function App() {
  return (
    <PrivyProvider 
      appId="your-privy-app-id"
      config={customConfig}
    >
      {/* Your app content */}
    </PrivyProvider>
  )
}

🎯 Core Components

Authentication Provider

import { PrivyProvider } from '@zynkah/privy-lib'

<PrivyProvider
  appId="your-app-id"
  clientId="your-client-id" // optional
  config={customConfig} // optional
  smartWalletConfig={smartWalletConfig} // optional
  disableSmartWallets={false} // optional
>
  <YourApp />
</PrivyProvider>

Casino Auth Provider

import { CasinoAuthProvider, useCasinoAuth } from '@zynkah/privy-lib'

function CasinoApp() {
  return (
    <CasinoAuthProvider config={casinoConfig}>
      <GameInterface />
    </CasinoAuthProvider>
  )
}

function GameInterface() {
  const { user, login, logout } = useCasinoAuth()
  
  return (
    <div>
      {user ? (
        <button onClick={logout}>Logout</button>
      ) : (
        <button onClick={login}>Login to Play</button>
      )}
    </div>
  )
}

🪝 Hooks

useActiveWallet

import { useActiveWallet } from '@zynkah/privy-lib'

function WalletInfo() {
  const { wallet, address, chainId, switchWallet } = useActiveWallet()
  
  return (
    <div>
      <p>Address: {address}</p>
      <p>Chain: {chainId}</p>
      <button onClick={() => switchWallet()}>Switch Wallet</button>
    </div>
  )
}

🎨 UI Components

WalletOverview

import { WalletOverview } from '@zynkah/privy-lib'

function Dashboard() {
  return (
    <div>
      <h1>My Dashboard</h1>
      <WalletOverview />
    </div>
  )
}

⚙️ Configuration

ConfigBuilder

import { ConfigBuilder } from '@zynkah/privy-lib'

const config = new ConfigBuilder()
  .setAppearance({
    theme: 'dark',
    accentColor: '#6366f1',
    logo: 'https://your-logo-url.com/logo.png'
  })
  .setLoginMethods(['email', 'google', 'wallet'])
  .setEmbeddedWallets({
    createOnLogin: 'users-without-wallets',
    requireUserPasswordOnCreate: true
  })
  .setLegalAcceptanceRequired(true)
  .build()

📚 API Reference

// Main exports
export {
  PrivyProvider,
  CasinoAuthProvider,
  ConfigBuilder,
  ConfigManager
} from '@zynkah/privy-lib'

// Hooks
export {
  useActiveWallet,
  useAdaptiveWallet,
  useAuthWallet,
  useBlockExplorerUrl,
  useIsUserAuthenticated,
  usePrivyService,
  useCasinoAuth
} from '@zynkah/privy-lib'

// Components
export {
  SelectWalletModal,
  WalletOverview,
  FundWalletModal,
  WithdrawPrivyModal
} from '@zynkah/privy-lib'

🔨 Development

Building the Library

# Build for production
npm run build

# Build and watch for changes
npm run dev

# Type checking
npm run type-check

# Clean build artifacts
npm run clean

Project Structure

@zynkah/privy-lib/
├── farePrivy/               # Main library code
│   ├── components/          # React components
│   ├── hooks/              # Custom hooks
│   ├── config/             # Configuration system
│   ├── modals/             # Modal components
│   ├── lib/                # Core libraries
│   └── utility/            # Utility components
├── dist/                   # Built output
└── index.ts               # Main entry point

📝 License

ISC License - see LICENSE file for details.

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📞 Support

🏆 Acknowledgments