Classes

BLSPublicKey

The public part of the BLS keypair. This is specified in the staking contract to verify votes from Validators.

Constructors

new BLSPublicKey()

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

Creates a new public key from a byte array.

ParameterType
FirstUint8Array

Methods

free()

free(): `void`

serialize()

serialize(): `Uint8Array`

Serializes the public key to a byte array.


toHex()

toHex(): `string`

Formats the public key into a hex string.


derive()

`static` derive(`secret_key`): [BLSPublicKey](BLSPublicKey)

Derives a public key from an existing private key.

ParameterType
FirstBLSSecretKey

deserialize()

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

Deserializes a public key from a byte array.

ParameterType
FirstUint8Array

fromHex()

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

Parses a public key from its hex representation.

ParameterType
Firststring

On this page