React library for adding COTI private token (pToken) support to wagmi v2 + RainbowKit dApps.
Important: This is a plugin for existing dApps and wallets, not a standalone wallet application. It provides React hooks, multi-wallet support, and token detection for any EIP-1193 wallet.
Full documentation lives in the COTI documentation repository:
| Topic | Link |
|---|---|
| Overview and quickstart | COTI Wallet Plugin |
| Integration guide | Integration Guide |
| Configuration | Configuration |
| API reference | API Reference |
| AES key onboarding | AES Key Onboarding |
| AES backup security | AES Backup Security |
| Remote AES backup (deprecated) | Secure Remote AES Backup Storage |
| Onboard modal theming | Onboard Modal Theming |
| Example app | Example App |
npm install @coti-io/coti-wallet-pluginnpm install react react-dom ethers viem @coti-io/coti-sdk-typescript @metamask/providers @rainbow-me/rainbowkit wagmi @tanstack/react-queryThis release is validated with @rainbow-me/rainbowkit@2.2.0 and wagmi@2.14.0.
import {
PrivacyBridgeProvider,
WagmiRainbowKitProvider,
usePrivateUnlock,
} from '@coti-io/coti-wallet-plugin';
export function Root() {
return (
<WagmiRainbowKitProvider walletConnectProjectId={walletConnectProjectId}>
<PrivacyBridgeProvider>
<App />
</PrivacyBridgeProvider>
</WagmiRainbowKitProvider>
);
}See the integration guide for provider setup, unlock flow, and private operations.
npm run build # dist/index.js (CJS) + dist/index.mjs (ESM) + dist/index.d.ts
npm run typecheck # TypeScript check
npm run test # Vitest suite
npm run lint # ESLintcd examples && npm run devSee Example App for setup details.
Apache 2.0