IBLSPublicKeyCompendium

Git Source

Author: Layr Labs, Inc.

Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service

Functions

operatorToPubkeyHash

mapping from operator address to pubkey hash. Returns zero if the operator has never registered, and otherwise returns the hash of the public key of the operator.

function operatorToPubkeyHash(address operator) external view returns (bytes32);

pubkeyHashToOperator

mapping from pubkey hash to operator address. Returns zero if no operator has ever registered the public key corresponding to pubkeyHash, and otherwise returns the (unique) registered operator who owns the BLS public key that is the preimage of pubkeyHash.

function pubkeyHashToOperator(bytes32 pubkeyHash) external view returns (address);

registerBLSPublicKey

Called by an operator to register themselves as the owner of a BLS public key and reveal their G1 and G2 public key.

function registerBLSPublicKey(G1Point memory signedMessageHash, G1Point memory pubkeyG1, G2Point memory pubkeyG2)
    external;

Parameters

Name
Type
Description

signedMessageHash

G1Point

is the registration message hash signed by the private key of the operator

pubkeyG1

G1Point

is the corresponding G1 public key of the operator

pubkeyG2

G2Point

is the corresponding G2 public key of the operator

getMessageHash

Returns the message hash that an operator must sign to register their BLS public key.

function getMessageHash(address operator) external view returns (G1Point memory);

Parameters

Name
Type
Description

operator

address

is the address of the operator registering their BLS public key

Events

NewPubkeyRegistration

Emitted when operator registers with the public keys pubkeyG1 and pubkeyG2.

event NewPubkeyRegistration(address indexed operator, G1Point pubkeyG1, G2Point pubkeyG2);

Structs

G1Point

struct G1Point {
    uint256 X;
    uint256 Y;
}

G2Point

struct G2Point {
    uint256[2] X;
    uint256[2] Y;
}

Last updated