Secp256k1PrivateKey

constructor(scheme: SignatureScheme = SignatureScheme.Secp256k1)

Creates a new Secp256k1PrivateKey with a randomly generated private key.

Default signature scheme is SignatureScheme.Secp256k1.

Parameters

scheme

The signature scheme to use.

Throws

If the signature scheme is not supported.


constructor(privateKey: String)

Creates a new Secp256k1PrivateKey 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)