@tevm/voltaire / primitives/ValidatorIndex
primitives/ValidatorIndex
Type Aliases
ValidatorIndexType
ValidatorIndexType =Defined in: src/primitives/ValidatorIndex/ValidatorIndexType.ts:13 ValidatorIndex type Represents a validator’s index in the beacon state registry. Each validator has a unique, immutable index assigned when they activate.number&object
Type Declaration
[brand]
readonly[brand]:"ValidatorIndex"
See
- https://voltaire.tevm.sh/primitives/validator-index for ValidatorIndex documentation
- https://github.com/ethereum/consensus-specs for Consensus specifications
Since
0.0.0Variables
ValidatorIndex
Defined in: src/primitives/ValidatorIndex/index.ts:9constValidatorIndex:object
Type Declaration
equals()
equals: (Check if ValidatorIndex values are equala,b) =>boolean
Parameters
a
ValidatorIndexType
First validator index
b
ValidatorIndexType
Second validator index
Returns
boolean
true if equal
See
https://voltaire.tevm.sh/primitives/validator-index for ValidatorIndex documentationSince
0.0.0Throws
Example
from()
from: (Create ValidatorIndex from number, bigint, or stringvalue) =>ValidatorIndexType
Parameters
value
Validator index (number, bigint, or decimal/hex string)string | number | bigint
Returns
ValidatorIndexType
ValidatorIndex value
See
https://voltaire.tevm.sh/primitives/validator-index for ValidatorIndex documentationSince
0.0.0Throws
If value is negative, not an integer, or out of rangeExample
toNumber()
toNumber: (Convert ValidatorIndex to numberindex) =>number
Parameters
index
ValidatorIndexType
ValidatorIndex value
Returns
number
Number representation
See
https://voltaire.tevm.sh/primitives/validator-index for ValidatorIndex documentationSince
0.0.0Throws
Example
Functions
equals()
equals(Defined in: src/primitives/ValidatorIndex/equals.js:18 Check if ValidatorIndex values are equala,b):boolean
Parameters
a
ValidatorIndexType
First validator index
b
ValidatorIndexType
Second validator index
Returns
boolean
true if equal
See
https://voltaire.tevm.sh/primitives/validator-index for ValidatorIndex documentationSince
0.0.0Throws
Example
from()
from(Defined in: src/primitives/ValidatorIndex/from.js:17 Create ValidatorIndex from number, bigint, or stringvalue):ValidatorIndexType
Parameters
value
Validator index (number, bigint, or decimal/hex string)string | number | bigint
Returns
ValidatorIndexType
ValidatorIndex value
See
https://voltaire.tevm.sh/primitives/validator-index for ValidatorIndex documentationSince
0.0.0Throws
If value is negative, not an integer, or out of rangeExample
toNumber()
toNumber(Defined in: src/primitives/ValidatorIndex/toNumber.js:16 Convert ValidatorIndex to numberindex):number
Parameters
index
ValidatorIndexType
ValidatorIndex value
Returns
number
Number representation

