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

@joai/warps-wallet-privy

v1.0.0-beta.9

Published

Privy wallet provider for multiple chains - Node.js compatible, no React dependencies

Readme

@joai/warps-wallet-privy

Privy wallet provider for Warps SDK. This package enables you to use Privy wallets with the Warps SDK across multiple blockchain networks. Designed for Node.js environments - no React dependencies required.

Installation

npm install @joai/warps-wallet-privy

Prerequisites

  • @joai/warps core package installed
  • Privy SDK installed and configured (@privy-io/server-sdk for Node.js)

Usage

Node.js Usage

Use Privy's server SDK to create a client:

import { PrivyClient } from '@privy-io/server-sdk'
import { PrivyWalletProvider } from '@joai/warps-wallet-privy'
import { WarpClient } from '@joai/warps'
import { getEvmAdapter } from '@joai/warps-adapter-evm'

const privyServerClient = new PrivyClient(process.env.PRIVY_APP_ID, process.env.PRIVY_APP_SECRET)

const privyClient = {
  getAddress: async () => {
    const user = await privyServerClient.getUser(userId)
    return user.wallet?.address || null
  },
  signTransaction: async (tx: any) => {
    return await privyServerClient.signTransaction(userId, tx)
  },
  signMessage: async (message: string) => {
    return await privyServerClient.signMessage(userId, message)
  },
}

const config = {
  env: 'mainnet',
  walletProviders: {
    ethereum: () => new PrivyWalletProvider({ privyClient }),
  },
}

const client = new WarpClient(config, [getEvmAdapter(config)])

// Use the client as normal
const wallet = client.getWallet('ethereum')
const address = await wallet.getAddress()

Browser/React Usage (Optional)

If you're using Privy in a React application, you can create a client adapter:

import { PrivyWalletProvider } from '@joai/warps-wallet-privy'
import { WarpClient } from '@joai/warps'
import { getEvmAdapter } from '@joai/warps-adapter-evm'

// Create a Privy client adapter from your React Privy instance
const privyClient = {
  getAddress: async () => {
    // Get address from your Privy instance
    return privyInstance.user?.wallet?.address || null
  },
  signTransaction: async (tx: any) => {
    // Sign transaction using your Privy instance
    return await privyInstance.user?.wallet?.signTransaction(tx)
  },
  signMessage: async (message: string) => {
    // Sign message using your Privy instance
    return await privyInstance.user?.wallet?.signMessage(message)
  },
}

const config = {
  env: 'mainnet',
  walletProviders: {
    ethereum: () => new PrivyWalletProvider({ privyClient }),
  },
}

const client = new WarpClient(config, [getEvmAdapter(config)])

With Multiple Chains

The Privy wallet provider supports multiple chains. You can configure it for different chains:

const privyClient = {
  getAddress: async () => /* ... */,
  signTransaction: async (tx: any) => /* ... */,
  signMessage: async (message: string) => /* ... */,
}

const config = {
  env: 'mainnet',
  walletProviders: {
    ethereum: () => new PrivyWalletProvider({ privyClient }),
    solana: () => new PrivyWalletProvider({ privyClient }),
  },
}

const client = new WarpClient(config, [
  getEvmAdapter(config),
  getSolanaAdapter(config),
])

API

Implements the WalletProvider interface from @joai/warps.

Constructor:

new PrivyWalletProvider(config: PrivyWalletProviderConfig)

Parameters:

  • config.privyClient: The Privy client interface
    • getAddress(): Promise<string | null> - Get the wallet address
    • signTransaction(tx: any): Promise<string> - Sign a transaction
    • signMessage(message: string): Promise<string> - Sign a message
  • config.address (optional): Fallback address if client doesn't provide one

Methods:

  • getAddress(): Promise<string | null> - Get the wallet address
  • getPublicKey(): Promise<string | null> - Get the public key (returns null for Privy)
  • signTransaction(tx: any): Promise<any> - Sign a transaction
  • signMessage(message: string): Promise<string> - Sign a message

Supported Chains

The Privy wallet provider works with any chain that Privy supports, including:

  • Ethereum and EVM-compatible chains
  • Solana
  • And other chains supported by Privy

Notes

  • Node.js-first design: This package has no React dependencies and is designed to work in Node.js environments
  • You need to provide a Privy client adapter that implements the PrivyClient interface
  • Public key is not available through Privy, so getPublicKey() always returns null
  • The client adapter should handle authentication and wallet availability checks
  • For React applications, create a client adapter that wraps your Privy React hooks