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 Flutter SDK

Embedded Wallets provides a comprehensive set of functions to handle authentication, user management, and blockchain interactions in your Flutter 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 Flutter projects.

List of functions​

tip

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

note

The code samples use log from dart:developer and PlatformException from package:flutter/services.dart. Add these imports to your file:

import 'dart:developer';

import 'package:flutter/services.dart';

Authentication functions​

Function NameDescription
connectTo()Signs the user in with the selected auth connection.
logout()Signs the user out from the current session.

Session functions​

Function NameDescription
getAccessToken()Retrieves the access token for the current auth session.
getIdentityToken()Retrieves the identity token (ID token) for the current session.
refreshSession()Refreshes the current session and returns the updated response.
getWeb3AuthResponse()Retrieves the Web3AuthResponse for the current session.

User management functions​

Function NameDescription
getUserInfo()Retrieves the authenticated user's information.
getUserInfoAsync()Fetches the user's information asynchronously from the native SDK.

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 templated wallet UI in WebView.
request()Opens templated transaction screens for signing EVM transactions.