Classes

BLSSecretKey

The secret part of the BLS keypair. This is specified in the config file, and is used by Validators to vote.

Constructors

new BLSSecretKey()

new BLSSecretKey(`bytes`): [BLSSecretKey](BLSSecretKey)

Creates a new private key from a byte array.

ParameterType
FirstUint8Array

Methods

free()

free(): `void`

serialize()

serialize(): `Uint8Array`

Serializes the private key to a byte array.


toHex()

toHex(): `string`

Formats the private key into a hex string.


deserialize()

`static` deserialize(`bytes`): [BLSSecretKey](BLSSecretKey)

Deserializes a private key from a byte array.

ParameterType
FirstUint8Array

fromHex()

`static` fromHex(`hex`): [BLSSecretKey](BLSSecretKey)

Parses a private key from its hex representation.

ParameterType
Firststring

generate()

`static` generate(): [BLSSecretKey](BLSSecretKey)

Generates a new private key from secure randomness.

On this page