For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

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 sign-in, 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​

tip

For detailed usage, configuration options, and code examples, refer to the dedicated documentation page for each function.

Authentication functions​

Function NameDescription
initialize()Fetches the project configuration and restores an existing session. See Initialize.
connectTo()Signs in the user with the selected auth connection. Supports both PnP and SFA authentication modes.
logout()Signs out the user from the current session.
refreshSession()Re-authorizes the current session without a new sign-in.

User management functions​

Function NameDescription
getUserInfo()Retrieves the authenticated user's information as a UserInfo object.
getUserInfoAsync()Retrieves UserInfo asynchronously, filling in idToken from the stored session.
getAccessToken()Retrieves the Auth access token for the current session.
getIdentityToken()Retrieves the identity token (JWT) for the current session.
getWeb3AuthResponse()Retrieves the full Web3AuthResponse from the current session, including keys and user info.

Private key functions​

Function NameDescription
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 NameDescription
enableMFA()Enables MFA for the user.
manageMFA()Allows users to manage their MFA settings.

Wallet Services functions​

Function NameDescription
showWalletUI()Launches the prebuilt Wallet Services UI in WebView with automatic chain configuration from dashboard.
request()Opens prebuilt 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()
warning

getWeb3AuthResponse() throws an Error (No user found, please login again!) if no session has been restored or created. Call it only after initialize() or connectTo() completes successfully.

For most use cases, prefer the typed methods (getPrivateKey(), getEd25519PrivateKey(), getUserInfo()) which provide a more ergonomic API with clear error messages.