Show / Hide Table of Contents

Class Validator

A class designed for a langword_csharp_Validator of consensus. A Validator consists of operator's PublicKey and its corresponding langword_csharp_Power.

Inheritance
Object
Validator
Implements
IEquatable<Validator>
Bencodex.IBencodable
Inherited Members
Object.Equals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace: Libplanet.Types.Consensus
Assembly: Libplanet.Types.dll
Syntax
public class Validator : IEquatable<Validator>, IBencodable

Constructors

| Improve this Doc View Source

Validator(IValue)

A class designed for a langword_csharp_Validator of consensus. A Validator consists of operator's PublicKey and its corresponding langword_csharp_Power.

Declaration
public Validator(IValue bencoded)
Parameters
Type Name Description
Bencodex.Types.IValue bencoded
| Improve this Doc View Source

Validator(PublicKey, BigInteger)

Creates an instance of Validator, with given publicKey and power.

Declaration
public Validator(PublicKey publicKey, BigInteger power)
Parameters
Type Name Description
PublicKey publicKey

The PublicKey of validator operator.

BigInteger power

The langword_csharp_Power of validator operator.

Exceptions
Type Condition
ArgumentOutOfRangeException

Thrown if power is negative.

Properties

| Improve this Doc View Source

Bencoded

A class designed for a langword_csharp_Validator of consensus. A Validator consists of operator's PublicKey and its corresponding langword_csharp_Power.

Declaration
[JsonIgnore]
public IValue Bencoded { get; }
Property Value
Type Description
Bencodex.Types.IValue
| Improve this Doc View Source

OperatorAddress

An Address of the validator operator's PublicKey.

Declaration
[JsonIgnore]
public Address OperatorAddress { get; }
Property Value
Type Description
Address
| Improve this Doc View Source

Power

The langword_csharp_Power of validator.

Declaration
public BigInteger Power { get; }
Property Value
Type Description
BigInteger
| Improve this Doc View Source

PublicKey

A PublicKey of validator operator.

Declaration
public PublicKey PublicKey { get; }
Property Value
Type Description
PublicKey

Methods

| Improve this Doc View Source

Equals(Validator)

A class designed for a langword_csharp_Validator of consensus. A Validator consists of operator's PublicKey and its corresponding langword_csharp_Power.

Declaration
public bool Equals(Validator other)
Parameters
Type Name Description
Validator other
Returns
Type Description
Boolean
| Improve this Doc View Source

Equals(Object)

A class designed for a langword_csharp_Validator of consensus. A Validator consists of operator's PublicKey and its corresponding langword_csharp_Power.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
Object.Equals(Object)
| Improve this Doc View Source

GetHashCode()

A class designed for a langword_csharp_Validator of consensus. A Validator consists of operator's PublicKey and its corresponding langword_csharp_Power.

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
Object.GetHashCode()
| Improve this Doc View Source

ToString()

A class designed for a langword_csharp_Validator of consensus. A Validator consists of operator's PublicKey and its corresponding langword_csharp_Power.

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
Object.ToString()

Operators

| Improve this Doc View Source

Equality(Validator, Validator)

A class designed for a langword_csharp_Validator of consensus. A Validator consists of operator's PublicKey and its corresponding langword_csharp_Power.

Declaration
public static bool operator ==(Validator obj, Validator other)
Parameters
Type Name Description
Validator obj
Validator other
Returns
Type Description
Boolean
| Improve this Doc View Source

Inequality(Validator, Validator)

A class designed for a langword_csharp_Validator of consensus. A Validator consists of operator's PublicKey and its corresponding langword_csharp_Power.

Declaration
public static bool operator !=(Validator obj, Validator other)
Parameters
Type Name Description
Validator obj
Validator other
Returns
Type Description
Boolean

Implements

System.IEquatable<T>
Bencodex.IBencodable
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium