Skip to main content

getValidators

Type Aliases

GetValidatorsParams

type GetValidatorsParams: object;

Type declaration

MemberTypeDescription
rollupAddressAddress of the rollup we're getting list of validators from

Source

src/getValidators.ts:60


GetValidatorsReturnType

type GetValidatorsReturnType: object;

Type declaration

MemberTypeDescription
isAccuratebooleanIf logs contain unknown signature, validators list might:
- contain false positives (validators that were removed, but returned as validator)
- contain false negatives (validators that were added, but not present in the list)
validatorsAddress[]List of validators for the given rollup

Source

src/getValidators.ts:64

Functions

getValidators()

function getValidators<TChain>(publicClient: object, GetValidatorsParams: GetValidatorsParams): Promise<GetValidatorsReturnType>

Type parameters

Type parameter
TChain extends undefined | Chain<undefined | ChainFormatters>

Parameters

ParameterTypeDescription
publicClientobjectThe chain Viem Public Client
GetValidatorsParamsGetValidatorsParamsGetValidatorsParams

Returns

Promise<GetValidatorsReturnType>

Promise<GetValidatorsReturnType>

Remarks

validators list is not guaranteed to be exhaustive if the isAccurate flag is false. It might contain false positive (validators that were removed, but returned as validator) or false negative (validators that were added, but not present in the list)

Example

const { isAccurate, validators } = getValidators(client, { rollup: '0xc47dacfbaa80bd9d8112f4e8069482c2a3221336' });

if (isAccurate) {
// Validators were all fetched properly
} else {
// Validators list is not guaranteed to be accurate
}

Source

src/getValidators.ts:95