Skip to main content

Ed25519 Private Key

To retrieve the Ed25519 private key of the user, use getEd25519PrivateKey method. This private key can be used to sign transactions on Solana, Near, Algorand, and other chains that use the ed25519 curve.

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.

Session behavior
  • When no active session exists, getEd25519PrivateKey() throws IllegalStateException. Check for an active session first using getPrivateKey().isNotEmpty().
  • If useSFAKey = true in Web3AuthOptions, this method returns the SFA Ed25519 core kit key instead of the standard Ed25519 key.

Usage

val ed25519PrivateKey = web3Auth.getEd25519PrivateKey()
On this page