Construct an instance of key pair given a secret key. It's generally assumed that these are encoded in base58.
Readonly
extendedReadonly
publicReadonly
secretReturns a string representation of the key pair in the format 'ed25519:[extendedSecretKey]'.
The string representation of the key pair.
Static
fromGenerate a new random keypair.
const keyRandom = KeyPair.fromRandom();
keyRandom.publicKey
// returns [PUBLIC_KEY]
keyRandom.secretKey
// returns [SECRET_KEY]
This class provides key pair functionality for Ed25519 curve: generating key pairs, encoding key pairs, signing and verifying.