Authentication
This guide covers wallet connection and authentication flows in the Privacy Boost TypeScript SDK.Authentication Flow
Privacy Boost authentication is a two-step process:- Connect - Establish wallet connection
- Login - Derive privacy keys and register with the indexer
Connect Wallet
Using EIP-1193 Provider (MetaMask, etc.)
Using WalletConnect
Using Private Key (Testing Only)
Login
After connecting, login to derive privacy keys:What Happens During Login
- SDK requests a challenge from the indexer
- User signs an EIP-712 typed data message
- SDK derives privacy keys from the signature:
- Master Public Key (MPK)
- Viewing Key
- Nullifying Key
- SDK registers with the indexer using the derived keys
- Indexer returns a JWT for authenticated requests