Class: BLSSecretKey
Defined in: @nimiq/core/types/wasm/web.d.ts:741
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
Defined in: @nimiq/core/types/wasm/web.d.ts:754
Creates a new private key from a byte array.
Parameters
bytes
Uint8Array
Returns
Methods
free()
free():
void
Defined in: @nimiq/core/types/wasm/web.d.ts:742
Returns
void
serialize()
serialize():
Uint8Array
Defined in: @nimiq/core/types/wasm/web.d.ts:758
Serializes the private key to a byte array.
Returns
Uint8Array
toHex()
toHex():
string
Defined in: @nimiq/core/types/wasm/web.d.ts:766
Formats the private key into a hex string.
Returns
string
deserialize()
static
deserialize(bytes
):BLSSecretKey
Defined in: @nimiq/core/types/wasm/web.d.ts:750
Deserializes a private key from a byte array.
Parameters
bytes
Uint8Array
Returns
fromHex()
static
fromHex(hex
):BLSSecretKey
Defined in: @nimiq/core/types/wasm/web.d.ts:762
Parses a private key from its hex representation.
Parameters
hex
string
Returns
generate()
static
generate():BLSSecretKey
Defined in: @nimiq/core/types/wasm/web.d.ts:746
Generates a new private key from secure randomness.