Skip to content

Class: 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

Creates a new public key from a byte array.

Parameters

bytes: Uint8Array

Returns

BLSPublicKey

Defined in

@nimiq/core/types/wasm/web.d.ts:716

Methods

free()

free(): void

Returns

void

Defined in

@nimiq/core/types/wasm/web.d.ts:699


serialize()

serialize(): Uint8Array

Serializes the public key to a byte array.

Returns

Uint8Array

Defined in

@nimiq/core/types/wasm/web.d.ts:721


toHex()

toHex(): string

Formats the public key into a hex string.

Returns

string

Defined in

@nimiq/core/types/wasm/web.d.ts:732


derive()

static derive(secret_key): BLSPublicKey

Derives a public key from an existing private key.

Parameters

secret_key: BLSSecretKey

Returns

BLSPublicKey

Defined in

@nimiq/core/types/wasm/web.d.ts:705


fromHex()

static fromHex(hex): BLSPublicKey

Parses a public key from its hex representation.

Parameters

hex: string

Returns

BLSPublicKey

Defined in

@nimiq/core/types/wasm/web.d.ts:727


unserialize()

static unserialize(bytes): BLSPublicKey

Deserializes a public key from a byte array.

Parameters

bytes: Uint8Array

Returns

BLSPublicKey

Defined in

@nimiq/core/types/wasm/web.d.ts:711