ValidatorsState

Class: ValidatorsState

Properties overview

  • chainId: Field = Field;
  • count: UInt32 = UInt32;
  • root: Field = Field;
  • Overrides: Struct({
    / Chain ID (e.g., 'mina:mainnet') /
    chainId: Field,
    / Merkle root of the ValidatorsList /
    root: Field,
    / Number of validators /
    count: UInt32,
    }).empty

Methods overview

Defined in: packages/upgradable/src/validators.ts:79

Represents the state of the validators.

Extends

  • {
    chainId: Field;
    count: UInt32;
    root: Field;
    }

Constructors

new ValidatorsState()

new ValidatorsState(value: {
  chainId: Field;
  count: UInt32;
  root: Field;
 }): ValidatorsState

Defined in: node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:103

Parameters

value
chainId

Field = Field

Chain ID (e.g., 'mina:mainnet')

count

UInt32 = UInt32

Number of validators

root

Field = Field

Merkle root of the ValidatorsList

Returns

ValidatorsState

Inherited from

Struct({
  / Chain ID (e.g., 'mina:mainnet') /
  chainId: Field,
  / Merkle root of the ValidatorsList /
  root: Field,
  / Number of validators /
  count: UInt32,
}).constructor

Properties

chainId

chainId: Field = Field;

Defined in: packages/upgradable/src/validators.ts:81

Chain ID (e.g., 'mina:mainnet')

Inherited from

Struct({
  / Chain ID (e.g., 'mina:mainnet') /
  chainId: Field,
  / Merkle root of the ValidatorsList /
  root: Field,
  / Number of validators /
  count: UInt32,
}).chainId

count

count: UInt32 = UInt32;

Defined in: packages/upgradable/src/validators.ts:85

Number of validators

Inherited from

Struct({
  / Chain ID (e.g., 'mina:mainnet') /
  chainId: Field,
  / Merkle root of the ValidatorsList /
  root: Field,
  / Number of validators /
  count: UInt32,
}).count

root

root: Field = Field;

Defined in: packages/upgradable/src/validators.ts:83

Merkle root of the ValidatorsList

Inherited from

Struct({
  / Chain ID (e.g., 'mina:mainnet') /
  chainId: Field,
  / Merkle root of the ValidatorsList /
  root: Field,
  / Number of validators /
  count: UInt32,
}).root

Methods

hash()

hash(): Field

Defined in: packages/upgradable/src/validators.ts:102

Computes the hash of the validators state.

Returns

Field

Hash of the current state.


assertEquals()

static assertEquals(a: ValidatorsState, b: ValidatorsState): void

Defined in: packages/upgradable/src/validators.ts:92

Asserts that two ValidatorsState instances are equal.

Parameters

a

ValidatorsState

First ValidatorsState instance.

b

ValidatorsState

Second ValidatorsState instance.

Returns

void


empty()

static empty(): ValidatorsState

Defined in: packages/upgradable/src/validators.ts:110

Returns an empty ValidatorsState.

Returns

ValidatorsState

An empty ValidatorsState instance.

Overrides

Struct({
  / Chain ID (e.g., 'mina:mainnet') /
  chainId: Field,
  / Merkle root of the ValidatorsList /
  root: Field,
  / Number of validators /
  count: UInt32,
}).empty