@coinbase/cdp-core
, these hooks offer a React-friendly interface for authentication and embedded wallet operations.
Available hooks
useSignInWithEmail
- Initiate email authentication flowuseVerifyEmailOTP
- Verify OTP code sent to emailuseCurrentUser
- Get the current authenticated useruseIsSignedIn
- Check if user is signed inuseSignOut
- Sign out the current useruseEvmAddress
- Get the primary EVM wallet addressuseEvmAccounts
- Get all EVM accountsuseSendEvmTransaction
- Send transactions on Base networks (Base and Base Sepolia only)useSignEvmTransaction
- Sign transactions for any EVM networkuseSignEvmMessage
- Sign plain text messagesuseSignEvmTypedData
- Sign EIP-712 typed datauseSignEvmHash
- Sign message hashesuseExportEvmAccount
- Export wallet private keyuseIsInitialized
- Check if SDK is readyuseConfig
- Access CDP configurationcdp-hooks
installed:CDPHooksProvider
in your application:
"use client"
requirements and common gotchas.flowId
flowId
, after which the user will be authenticated, returning a User objectviem
to broadcast the transaction: