validator.get
Gets validator information by address.
Usage
import { client } from './viem.config'
const validator = await client.validator.get({
validator: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb',
})
console.log('Validator:', validator)
Validator: { publicKey: '0x...', active: true, index: 0n, validatorAddress: '0x...', inboundAddress: '...', outboundAddress: '...' }import { Account, createClient } from 'viem/tempo'
export const client = createClient({
account: Account.fromSecp256k1('0x...'),
})Return Type
type ReturnType = {
/** The validator's communication public key */
publicKey: Hex
/** Whether the validator is active */
active: boolean
/** The validator's index */
index: bigint
/** The validator's address */
validatorAddress: Address
/** The validator's inbound address for incoming connections */
inboundAddress: string
/** The validator's outbound IP address for firewall whitelisting */
outboundAddress: string
}Parameters
validator
- Type:
Address
Validator address.
blockNumber (optional)
- Type:
bigint
Block number to read the state from.
blockOverrides (optional)
- Type:
BlockOverrides
Block overrides to apply to the state.
blockTag (optional)
- Type:
BlockTag
Block tag to read the state from.
stateOverride (optional)
- Type:
StateOverride
State override to apply.