Using Android SDK
Embedded Wallets provides a comprehensive set of functions to handle authentication, user management, and blockchain interactions in your Android applications. These functions allow you to implement features like user login, Multi-Factor Authentication (MFA), private key retrieval, and Wallet Services with minimal effort. Each function is designed to handle a specific aspect of Embedded Wallets' functionality, making it easy to integrate into your Android projects.
List of functions
For detailed usage, configuration options, and code examples, refer to the dedicated documentation page for each function.
Authentication functions
| Function Name | Description |
|---|---|
connectTo() | Logs in the user with the selected login provider. |
logout() | Logs out the user from the current session. |
User management functions
| Function Name | Description |
|---|---|
getUserInfo() | Retrieves the authenticated user's information as a UserInfo object. |
getWeb3AuthResponse() | Retrieves the full Web3AuthResponse from the current session, including keys and user info. |
Private key functions
| Function Name | Description |
|---|---|
getPrivateKey() | Retrieve the user's secp256k1 private key for EVM-compatible chains. |
getEd25519PrivateKey() | Retrieve the user's ed25519 private key for chains like Solana, Near, Algorand. |
Security functions
| Function Name | Description |
|---|---|
enableMFA() | Enables MFA for the user. |
manageMFA() | Allows users to manage their MFA settings. |
Wallet Services functions
| Function Name | Description |
|---|---|
showWalletUI() | Launches the templated wallet UI in WebView with automatic chain configuration from dashboard. |
request() | Opens templated transaction screens for signing EVM transactions with simplified parameters. |
getWeb3AuthResponse()
The getWeb3AuthResponse() method returns the full Web3AuthResponse from the current session. This gives you direct access to all session data including keys, user info, signatures, and factor keys.
val response = web3Auth.getWeb3AuthResponse()
getWeb3AuthResponse() throws an Error with code NOUSERFOUND when no active session exists. Check for an active session using getPrivateKey().isNotEmpty() before calling this method.
For most use cases, prefer the typed accessors (getPrivateKey(), getEd25519PrivateKey(), getUserInfo()) which provide a more ergonomic API with clear error messages.