Skip to main content

ValidatorCommittee

type ValidatorCommittee​

The Validator Set for a particular epoch.

BCS​

The BCS serialized form of this type is specified in [`bcs-schema.abnf`](https://github.com/iotaledger/iota-rust-sdk/blob/develop/crates/iota-sdk-types/bcs-schema.abnf\).

type ValidatorCommittee struct {
// contains filtered or unexported fields
}

func LiftFromExternalValidatorCommittee​

func LiftFromExternalValidatorCommittee(handle uint64) *ValidatorCommittee

func NewValidatorCommittee​

func NewValidatorCommittee(epoch uint64, members []ValidatorCommitteeMember) (*ValidatorCommittee, error)

Construct a `ValidatorCommittee` and verify it via `validate`.

func ValidatorCommitteeFromBcs​

func ValidatorCommitteeFromBcs(bcs []byte) (*ValidatorCommittee, error)

Create this type from BCS encoded bytes.

func ValidatorCommitteeFromJson​

func ValidatorCommitteeFromJson(json string) (*ValidatorCommittee, error)

Create this type from a JSON encoded string.

func (*ValidatorCommittee) DebugString​

func (_self *ValidatorCommittee) DebugString() string

func (*ValidatorCommittee) Destroy​

func (object *ValidatorCommittee) Destroy()

func (*ValidatorCommittee) Epoch​

func (_self *ValidatorCommittee) Epoch() uint64

func (*ValidatorCommittee) Eq​

func (_self *ValidatorCommittee) Eq(other *ValidatorCommittee) bool

func (*ValidatorCommittee) Members​

func (_self *ValidatorCommittee) Members() []ValidatorCommitteeMember

func (*ValidatorCommittee) Ne​

func (_self *ValidatorCommittee) Ne(other *ValidatorCommittee) bool

func (*ValidatorCommittee) ToBcs​

func (_self *ValidatorCommittee) ToBcs() ([]byte, error)

Convert this type to BCS encoded bytes.

func (*ValidatorCommittee) ToDisplayString​

func (_self *ValidatorCommittee) ToDisplayString() string

Render this type as human-readable text.

Some types also print this through the binding's native string conversion; this method is the spelling every object type has.

The layout is meant for reading and can change between releases. Use the JSON or BCS conversions for output that gets parsed.

func (*ValidatorCommittee) ToJson​

func (_self *ValidatorCommittee) ToJson() (string, error)

Convert this type to a JSON encoded string.

func (*ValidatorCommittee) TotalStake​

func (_self *ValidatorCommittee) TotalStake() (uint64, error)

The combined stake of all members.

func (*ValidatorCommittee) Validate​

func (_self *ValidatorCommittee) Validate() error

Checks if the committee is valid.

A valid committee is one that: - Has at least one member - Has a nonzero total stake that fits in a `u64` - Contains no duplicate public keys