• Checks whether a validator is active on the Solana network.

    Parameters

    • endpoint: string

      The URL of the Solana RPC endpoint.

    • voteAccountPubkey: string

      The public key of the validator's vote account.

    Returns Promise<ValidatorStatusParams>

    A ValidatorStatusParams object containing the validator's public key, activity status, and the reason for that status.

    Example

    const endpoint = 'https://api.mainnet-beta.solana.com'
    const voteAccountPubkey = 'ExampleVoteAccountPubkey'

    const status = await isValidatorActive(endpoint, voteAccountPubkey)
    console.log(`Validator status: ${JSON.stringify(status)}`)

    Throws

    Throws an error if there is a problem accessing the network or querying validator status.

Generated using TypeDoc