Classes
BLSSecretKey
The secret part of the BLS keypair. This is specified in the config file, and is used by Validators to vote.
Constructors
new BLSSecretKey()
Creates a new private key from a byte array.
| Parameter | Type |
|---|---|
| First | Uint8Array |
| Returns |
|---|
| BLSSecretKey |
Methods
free()
serialize()
Serializes the private key to a byte array.
toHex()
Formats the private key into a hex string.
deserialize()
Deserializes a private key from a byte array.
| Parameter | Type |
|---|---|
| First | Uint8Array |
| Returns |
|---|
| BLSSecretKey |
fromHex()
Parses a private key from its hex representation.
| Parameter | Type |
|---|---|
| First | string |
| Returns |
|---|
| BLSSecretKey |
generate()
Generates a new private key from secure randomness.
| Returns |
|---|
| BLSSecretKey |