Integration Guide
1. Wrap your app once
import {
PrivacyBridgeProvider,
WagmiRainbowKitProvider,
type OnboardModalTheme,
} from '@coti-io/coti-wallet-plugin';
const onboardTheme: OnboardModalTheme = {
modal: { backgroundColor: '#ffffff', color: '#0f172a' },
title: { color: '#0f172a' },
description: { color: '#64748b' },
primaryButton: { backgroundColor: '#1E29F6', color: '#ffffff' },
saveOptionTitle: { color: '#0f172a' },
saveOptionDescription: { color: '#64748b' },
tooltipButton: { color: '#64748b' },
};
export function Root() {
return (
<WagmiRainbowKitProvider walletConnectProjectId={walletConnectProjectId}>
<PrivacyBridgeProvider
privateUnlock={{
theme: onboardTheme,
warning:
'This dApp never stores or receives the AES key. Unlock stays inside the plugin.',
onRestoreCancelled: () => {
// Optional: show "User canceled" toast.
},
}}
>
<App />
</PrivacyBridgeProvider>
</WagmiRainbowKitProvider>
);
}Optional: network guard
2. Configure the plugin (before rendering hooks)
3. Add an unlock control
usePrivateUnlock() API
Method / property
Description
4. Guard private actions
5. Display token balances
6. Bridge public ↔ private tokens
Lock semantics
Onboarding routes
Wallet
First route
Fallback
Do
Do not
Error handling
Related docs
Last updated
Was this helpful?