Ed25519PrivateKey

constructor(scheme: SignatureScheme = SignatureScheme.ED25519)

Creates a new Ed25519PrivateKey with a randomly generated private key.

Default signature scheme is SignatureScheme.ED25519.

Parameters

scheme

The signature scheme to use.

Throws

If the signature scheme is not supported.


constructor(privateKey: String)

Creates a new Ed25519PrivateKey from an encoded private key.

The expected format is a Bech32 encoded private key.

Parameters

privateKey

The encoded private key.

Throws

If the private key is invalid.


constructor(privateKey: ByteArray)