Validator class

Validator defines a validator, together with the total amount of the Validator's bond shares and their exchange rate to coins. Slashing results in a decrease in the exchange rate, allowing correct calculation of future undelegations without iterating over delegators. When coins are delegated to this validator, the validator is credited with a delegation whose number of bond shares is based on the amount of coins delegated divided by the current exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate.

Inheritance
  • Object
  • GeneratedMessage
  • Validator

Constructors

Validator.new({String? operatorAddress, Any? consensusPubkey, bool? jailed, BondStatus? status, String? tokens, String? delegatorShares, Description? description, Int64? unbondingHeight, Timestamp? unbondingTime, Commission? commission, String? minSelfDelegation, Int64? unbondingOnHoldRefCount, Iterable<Int64>? unbondingIds})
factory
Validator.fromBuffer(List<int> i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
factory
Validator.fromJson(String i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
factory

Properties

commission Commission
commission defines the commission parameters.
getter/setter pair
consensusPubkey Any
consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.
getter/setter pair
delegatorShares String
delegator_shares defines total shares issued to a validator's delegators.
getter/setter pair
description Description
description defines the description terms for the validator.
getter/setter pair
eventPlugin → EventPlugin?
Subclasses can override this getter to be notified of changes to protobuf fields.
no setterinherited
hashCode int
Calculates a hash code based on the contents of the protobuf.
no setterinherited
info_ → BuilderInfo
no setteroverride
isFrozen bool
Returns true if this message is marked read-only. Otherwise false.
no setterinherited
jailed bool
jailed defined whether the validator has been jailed from bonded status or not.
getter/setter pair
minSelfDelegation String
min_self_delegation is the validator's self declared minimum self delegation.
getter/setter pair
operatorAddress String
operator_address defines the address of the validator's operator; bech encoded in JSON.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status BondStatus
status is the validator status (bonded/unbonding/unbonded).
getter/setter pair
tokens String
tokens define the delegated tokens (incl. self-delegation).
getter/setter pair
unbondingHeight ↔ Int64
unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.
getter/setter pair
unbondingIds List<Int64>
list of unbonding ids, each uniquely identifing an unbonding of this validator
no setter
unbondingOnHoldRefCount ↔ Int64
strictly positive if this validator's unbonding has been stopped by external modules
getter/setter pair
unbondingTime Timestamp
unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.
getter/setter pair
unknownFields → UnknownFieldSet
no setterinherited

Methods

addExtension(Extension extension, Object? value) → void
Adds an extension field value to a repeated field.
inherited
check() → void
inherited
clear() → void
Clears all data that was set in this message.
inherited
clearCommission() → void
clearConsensusPubkey() → void
clearDelegatorShares() → void
clearDescription() → void
clearExtension(Extension extension) → void
Clears an extension field and also removes the extension.
inherited
clearField(int tagNumber) → void
Clears the contents of a given field.
inherited
clearJailed() → void
clearMinSelfDelegation() → void
clearOperatorAddress() → void
clearStatus() → void
clearTokens() → void
clearUnbondingHeight() → void
clearUnbondingOnHoldRefCount() → void
clearUnbondingTime() → void
clone() Validator
Creates a deep copy of the fields in this message. (The generated code uses mergeFromMessage.)
override
copyWith(void updates(Validator)) Validator
Apply updates to a copy of this message.
override
createEmptyInstance() Validator
Creates an empty instance of the same message type as this.
override
createMapField<K, V>(int tagNumber, MapFieldInfo<K, V> fi) Map<K, V>
Creates a Map representing a map field.
inherited
createRepeatedField<T>(int tagNumber, FieldInfo<T> fi) List<T>
Creates List implementing a mutable repeated field.
inherited
ensureCommission() Commission
ensureConsensusPubkey() Any
ensureDescription() Description
ensureUnbondingTime() Timestamp
extensionsAreInitialized() bool
inherited
freeze() → GeneratedMessage
Make this message read-only.
inherited
getDefaultForField(int tagNumber) → dynamic
Returns the default value for the given field.
inherited
getExtension(Extension extension) → dynamic
Returns the value of extension.
inherited
getField(int tagNumber) → dynamic
Returns the value of the field associated with tagNumber, or the default value if it is not set.
inherited
getFieldOrNull(int tagNumber) → dynamic
Returns the value of a field, ignoring any defaults.
inherited
getTagNumber(String fieldName) int?
inherited
hasCommission() bool
hasConsensusPubkey() bool
hasDelegatorShares() bool
hasDescription() bool
hasExtension(Extension extension) bool
Returns true if a value of extension is present.
inherited
hasField(int tagNumber) bool
Whether this message has a field associated with tagNumber.
inherited
hasJailed() bool
hasMinSelfDelegation() bool
hasOperatorAddress() bool
hasRequiredFields() bool
Whether the message has required fields.
inherited
hasStatus() bool
hasTokens() bool
hasUnbondingHeight() bool
hasUnbondingOnHoldRefCount() bool
hasUnbondingTime() bool
isInitialized() bool
Whether all required fields in the message and embedded messages are set.
inherited
mergeFromBuffer(List<int> input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Merges serialized protocol buffer data into this message.
inherited
mergeFromCodedBufferReader(CodedBufferReader input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
inherited
mergeFromJson(String data, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Merges field values from data, a JSON object, encoded as described by GeneratedMessage.writeToJson.
inherited
mergeFromJsonMap(Map<String, dynamic> json, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Merges field values from a JSON object represented as a Dart map.
inherited
mergeFromMessage(GeneratedMessage other) → void
Merges the contents of the other into this message.
inherited
mergeFromProto3Json(Object? json, {TypeRegistry typeRegistry = const TypeRegistry.empty(), bool ignoreUnknownFields = false, bool supportNamesWithUnderscores = true, bool permissiveEnums = false}) → void
Merges field values from json, a JSON object using proto3 encoding.
inherited
mergeUnknownFields(UnknownFieldSet unknownFieldSet) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setExtension(Extension extension, Object value) → void
Sets the value of a non-repeated extension field to value.
inherited
setField(int tagNumber, Object value) → void
Sets the value of a field by its tagNumber.
inherited
toBuilder() → GeneratedMessage
Creates a writable, shallow copy of this message.
inherited
toDebugString() String
Returns a String representation of this message.
inherited
toProto3Json({TypeRegistry typeRegistry = const TypeRegistry.empty()}) Object?
Returns an Object representing Proto3 JSON serialization of this.
inherited
toString() String
Returns a String representation of this message.
inherited
writeToBuffer() Uint8List
inherited
writeToCodedBufferWriter(CodedBufferWriter output) → void
inherited
writeToJson() String
Returns a JSON string that encodes this message.
inherited
writeToJsonMap() Map<String, dynamic>
Returns the JSON encoding of this message as a Dart Map.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create() Validator
createRepeated() → PbList<Validator>
getDefault() Validator