Classes

BLSKeyPair

A BLS keypair It is used by validators to vote during Tendermint rounds. This is just a wrapper around our internal BLS structs

Constructors

new BLSKeyPair()

new BLSKeyPair(`secret_key`, `public_key`): [BLSKeyPair](BLSKeyPair)
ParameterType
FirstBLSPublicKey
Returns
BLSKeyPair

Properties

publicKey

`readonly` publicKey: [BLSPublicKey](BLSPublicKey)

Gets the keypair's public key.


secretKey

`readonly` secretKey: [BLSSecretKey](BLSSecretKey)

Gets the keypair's secret key.

Methods

free()

free(): `void`

serialize()

serialize(): `Uint8Array`

Serializes to a byte array.


toHex()

toHex(): `string`

Formats the keypair into a hex string.


derive()

`static` derive(`private_key`): [BLSKeyPair](BLSKeyPair)

Derives a keypair from an existing private key.

ParameterType
FirstBLSSecretKey
Returns
BLSKeyPair

deserialize()

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

Deserializes a keypair from a byte array.

ParameterType
FirstUint8Array
Returns
BLSKeyPair

generate()

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

Generates a new keypair from secure randomness.

Returns
BLSKeyPair

On this page