Usage overview
The following pages document each operation exposed by the v9 SDK hooks API. All hooks require the component to be inside a Web3AuthProvider.
Hook to operation mapping
If you are migrating from v8, this table maps the old class methods to their v9 hook equivalents:
| v8 method | v9 hook and function | Page |
|---|---|---|
web3auth.login({ loginProvider }) | useWeb3AuthConnect() → connectTo({ authConnection }) | Login |
web3auth.logout() | useWeb3AuthDisconnect() → disconnect() | Logout |
web3auth.userInfo() | useWeb3AuthUser() → userInfo | User info |
web3auth.privKey / getPrivKey() | useWeb3Auth() → provider (for signing) | Private key |
Ed25519 key (getEd25519PrivKey()) | useWeb3Auth() → web3Auth.signer | Ed25519 / Solana |
web3auth.launchWalletServices() | useWalletUI() → showWalletUI() | Wallet UI |
web3auth.request(chainConfig, ...) | useSignatureRequest() → request(method, params) | Signature request |
enableMFA() on instance | useEnableMFA() → enableMFA() | Enable MFA |