Class: BLSKeyPair
Defined in: @nimiq/core/types/wasm/web.d.ts:674
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
Defined in: @nimiq/core/types/wasm/web.d.ts:688
Parameters
secret_key
public_key
Returns
Properties
publicKey
readonly
publicKey:BLSPublicKey
Defined in: @nimiq/core/types/wasm/web.d.ts:704
Gets the keypair's public key.
secretKey
readonly
secretKey:BLSSecretKey
Defined in: @nimiq/core/types/wasm/web.d.ts:700
Gets the keypair's secret key.
Methods
free()
free():
void
Defined in: @nimiq/core/types/wasm/web.d.ts:675
Returns
void
serialize()
serialize():
Uint8Array
Defined in: @nimiq/core/types/wasm/web.d.ts:692
Serializes to a byte array.
Returns
Uint8Array
toHex()
toHex():
string
Defined in: @nimiq/core/types/wasm/web.d.ts:696
Formats the keypair into a hex string.
Returns
string
derive()
static
derive(private_key
):BLSKeyPair
Defined in: @nimiq/core/types/wasm/web.d.ts:683
Derives a keypair from an existing private key.
Parameters
private_key
Returns
deserialize()
static
deserialize(bytes
):BLSKeyPair
Defined in: @nimiq/core/types/wasm/web.d.ts:687
Deserializes a keypair from a byte array.
Parameters
bytes
Uint8Array
Returns
generate()
static
generate():BLSKeyPair
Defined in: @nimiq/core/types/wasm/web.d.ts:679
Generates a new keypair from secure randomness.