The Attestation module is responsible for Valset (Validator set) and vote management.

Example

To use Attestation methods, initialise a ChainGrpcAttestationApi object to with a gRPC endpoint. An endpoint can be retrieved by using networkEndpoints.

const endpoint =  getEndpointsForNetwork(Network.Devnet).grpcEndpoint;
const client = new ChainGrpcAttestationApi(endpoint.grpcEndpoint);
const response = await client.fetchLatestValsetNonce();

Hierarchy

  • default
    • ChainGrpcAttestationApi

Methods

  • Returns

    last event nonce for a validator.

    Parameters

    • chainId: string

      chain ID.

    • valAddress: string

      validator address.

    Returns Promise<{
        eventNonce: number;
    }>

  • Returns

    valset.

    Parameters

    • valsetNonce: number

      nonce of valset.

    Returns Promise<{
        valset: undefined | AsObject;
    }>

Generated using TypeDoc