Class: BLSKeyPair
A BLS keypair It is used by validators to vote during Tendermint rounds. This is just a wrapper around our internal BLS structs
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new BLSKeyPair(secret_key, public_key): BLSKeyPair
Parameters
| Name | Type |
|---|---|
secret_key | BLSSecretKey |
public_key | BLSPublicKey |
Returns
Defined in
web.d.ts:652
Properties
publicKey
• Readonly publicKey: BLSPublicKey
Gets the keypair's public key.
Defined in
web.d.ts:666
secretKey
• Readonly secretKey: BLSSecretKey
Gets the keypair's secret key.
Defined in
web.d.ts:670
Methods
free
▸ free(): void
Returns
void
Defined in
web.d.ts:630
serialize
▸ serialize(): Uint8Array
Serializes to a byte array.
Returns
Uint8Array
Defined in
web.d.ts:657
toHex
▸ toHex(): string
Formats the keypair into a hex string.
Returns
string
Defined in
web.d.ts:662
derive
▸ derive(private_key): BLSKeyPair
Derives a keypair from an existing private key.
Parameters
| Name | Type |
|---|---|
private_key | BLSSecretKey |
Returns
Defined in
web.d.ts:641
generate
▸ generate(): BLSKeyPair
Generates a new keypair from secure randomness.
Returns
Defined in
web.d.ts:635
unserialize
▸ unserialize(bytes): BLSKeyPair
Deserializes a keypair from a byte array.
Parameters
| Name | Type |
|---|---|
bytes | Uint8Array |
Returns
Defined in
web.d.ts:647