Function generateKeyPair
Returns Promise<KeyPair>
A promise that resolves to a KeyPair object containing both private and public keys
Remarks
This function uses the noble-ed25519 library to generate a secure random private key and derives the corresponding public key. The asynchronous version is recommended for better performance in environments that support it.
SECURITY WARNING: The generated private key must be stored securely. Never expose it in logs, network requests, or insecure storage. Consider using hardware wallets or encrypted storage for production applications.
Generates a new Ed25519 key pair asynchronously using cryptographically secure random bytes.