Skip to content

Class: BLSPublicKey ​

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

Table of contents ​

Constructors ​

Methods ​

Constructors ​

constructor ​

• new BLSPublicKey(bytes): BLSPublicKey

Creates a new public key from a byte array.

Parameters ​

NameType
bytesUint8Array

Returns ​

BLSPublicKey

Defined in ​

web.d.ts:694

Methods ​

free ​

▸ free(): void

Returns ​

void

Defined in ​

web.d.ts:677


serialize ​

▸ serialize(): Uint8Array

Serializes the public key to a byte array.

Returns ​

Uint8Array

Defined in ​

web.d.ts:699


toHex ​

▸ toHex(): string

Formats the public key into a hex string.

Returns ​

string

Defined in ​

web.d.ts:710


derive ​

▸ derive(secret_key): BLSPublicKey

Derives a public key from an existing private key.

Parameters ​

NameType
secret_keyBLSSecretKey

Returns ​

BLSPublicKey

Defined in ​

web.d.ts:683


fromHex ​

▸ fromHex(hex): BLSPublicKey

Parses a public key from its hex representation.

Parameters ​

NameType
hexstring

Returns ​

BLSPublicKey

Defined in ​

web.d.ts:705


unserialize ​

▸ unserialize(bytes): BLSPublicKey

Deserializes a public key from a byte array.

Parameters ​

NameType
bytesUint8Array

Returns ​

BLSPublicKey

Defined in ​

web.d.ts:689