Ed25519 Private Key
The getEd25519PrivateKey method returns the user's Ed25519 private key.
Use this key to sign transactions on Solana, Near, Algorand, and other chains that use the Ed25519
curve.
This method throws:
Web3AuthError.noUserFoundif no user session exists.Web3AuthError.ed25519KeyNotFoundif the session has no Ed25519 key.Web3AuthError.ed25519CustomAuthErrorifuseSFAKeyistrueand the user signed in with a custom auth connection.
When you set useSFAKey to true in Web3AuthOptions, this method returns the single-factor
authentication (SFA) Ed25519 key.
Usage
let ed25519PrivateKey = try web3Auth.getEd25519PrivateKey()