privy-wallet-kit
v0.0.10
Published
Maintenance-mode React components and hooks for Privy-connected EVM wallets.
Readme
Privy Wallet Kit
Privy Wallet Kit is an experimental React component and hook library for EVM wallets connected through Privy.
Maintenance mode: This project receives critical compatibility and security fixes only. No new features are planned. For new applications, prefer Privy's official React hooks and wallet UI components.
Scope
The package provides:
- Presentational wallet components such as
WalletCard,AssetList,TransferForm,TransactionHistory, andNFTGallery. - EVM-focused hooks for balances, ERC-20 assets, transfers, message signing, and network switching.
- Optional fetcher interfaces for transaction history and NFT data.
The package does not include an NFT or transaction-history indexer. NFTGallery and TransactionHistory must receive data directly or use an application-provided fetcher. They never generate placeholder wallet data.
This project does not support Privy's Solana or extended-chain wallets. It also does not replace Privy's current transaction confirmation UI, gas sponsorship, or funding flows.
Installation
npm install privy-wallet-kit @privy-io/react-auth viem react react-domPrivy setup
Wrap the application with Privy's provider. The package supports React 18 and React 19.
import { PrivyProvider } from '@privy-io/react-auth';
export function Providers({ children }: { children: React.ReactNode }) {
return (
<PrivyProvider
appId="your-privy-app-id"
config={{
embeddedWallets: {
ethereum: {
createOnLogin: 'users-without-wallets',
},
},
}}
>
{children}
</PrivyProvider>
);
}Components and hooks
import { AssetList, NetworkSwitcher, TransferForm } from 'privy-wallet-kit';
import 'privy-wallet-kit/style.css';
export function WalletPage() {
return (
<div className="space-y-4">
<NetworkSwitcher />
<AssetList tokens={[]} />
<TransferForm onReview={console.log} onCancel={() => undefined} />
</div>
);
}For new transaction and signing flows, prefer Privy's official useSendTransaction and useSignMessage hooks. The corresponding hooks in this package are retained for existing consumers.
Indexed data
Pass already-fetched data to the presentational components:
import { NFTGallery, TransactionHistory } from 'privy-wallet-kit';
<NFTGallery nfts={nftsFromYourIndexer} />;
<TransactionHistory transactions={transactionsFromYourIndexer} />;Or provide an indexer-backed fetcher:
import { NFTGallery, TransactionHistory } from 'privy-wallet-kit';
<NFTGallery
fetcher={({ address, chainId }) =>
fetch(`/api/nfts?address=${address}&chainId=${chainId}`).then((response) => response.json())
}
/>;
<TransactionHistory
fetcher={({ address, chainId }) =>
fetch(`/api/transactions?address=${address}&chainId=${chainId}`).then((response) =>
response.json(),
)
}
/>;The application is responsible for indexer credentials, pagination, normalization, and chain coverage.
Support policy
- Critical security and compatibility fixes may be accepted.
- Feature requests and roadmap expansion are out of scope.
- APIs remain alpha and may not cover production requirements.
- See the Storybook for the currently documented components.
License
MIT
