Ed25519 private key
To retrieve the ed25519 private key of the user, use the getEd25519PrivateKey method. This private key can be used to sign transactions on Solana, Near, Algorand, and other chains that use the ed25519 curve.
The method throws if the user isn't authenticated: Android returns a PlatformException, and iOS
returns null, which surfaces in Dart as a type error. To check for an existing session, use
getPrivateKey, which returns an empty string instead.
Usage
try {
final String privateKey = await Web3AuthFlutter.getEd25519PrivateKey();
} catch (e) {
// No active session.
log(e.toString());
}
note
Web3Auth supports two widely used cryptographic curves, Secp256k1 and Ed25519, making it chain-agnostic and compatible with multiple blockchain networks. Learn more about how to connect different blockchains.