Skip to content

packages.valory.protocols.abci.custom_types

This module contains class representations corresponding to every custom type in the protocol specification.

BlockParams Objects

class BlockParams()

This class represents an instance of BlockParams.

__init__

def __init__(max_bytes: int, max_gas: int)

Initialise an instance of BlockParams.

encode

@staticmethod
def encode(block_params_protobuf_object,
           block_params_object: "BlockParams") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the block_params_protobuf_object argument is matched with the instance of this class in the 'block_params_object' argument.

Arguments:

  • block_params_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • block_params_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, block_params_protobuf_object) -> "BlockParams"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'block_params_protobuf_object' argument.

Arguments:

  • block_params_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'block_params_protobuf_object' argument.

__eq__

def __eq__(other) -> bool

Compare with another object.

Duration Objects

class Duration()

This class represents an instance of Duration.

__init__

def __init__(seconds: int, nanos: int)

Initialise an instance of Duration.

Arguments:

  • seconds: Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive.
  • nanos: Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 seconds field and a positive or negative nanos field. For durations of one second or more, a non-zero value for the nanos field must be of the same sign as the seconds field. Must be from -999,999,999 to +999,999,999 inclusive.

encode

@staticmethod
def encode(duration_protobuf_object, duration_object: "Duration") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the duration_protobuf_object argument is matched with the instance of this class in the 'duration_object' argument.

Arguments:

  • duration_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • duration_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, duration_protobuf_object) -> "Duration"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'duration_protobuf_object' argument.

Arguments:

  • duration_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'duration_protobuf_object' argument.

__eq__

def __eq__(other) -> bool

Compare with another object.

EvidenceParams Objects

class EvidenceParams()

This class represents an instance of EvidenceParams.

__init__

def __init__(max_age_num_blocks: int, max_age_duration: Duration,
             max_bytes: int)

Initialise an instance of BlockParams.

encode

@staticmethod
def encode(evidence_params_protobuf_object,
           evidence_params_object: "EvidenceParams") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the evidence_params_protobuf_object argument is matched with the instance of this class in the 'evidence_params_object' argument.

Arguments:

  • evidence_params_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • evidence_params_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, evidence_params_protobuf_object) -> "EvidenceParams"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'evidence_params_protobuf_object' argument.

Arguments:

  • evidence_params_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'evidence_params_protobuf_object' argument.

__eq__

def __eq__(other) -> bool

Compare with another object.

ValidatorParams Objects

class ValidatorParams()

This class represents an instance of ValidatorParams.

__init__

def __init__(pub_key_types: List[str])

Initialise an instance of BlockParams.

encode

@staticmethod
def encode(validator_params_protobuf_object,
           validator_params_object: "ValidatorParams") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the validator_params_protobuf_object argument is matched with the instance of this class in the 'validator_params_object' argument.

Arguments:

  • validator_params_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • validator_params_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, validator_params_protobuf_object) -> "ValidatorParams"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'validator_params_protobuf_object' argument.

Arguments:

  • validator_params_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'validator_params_protobuf_object' argument.

__eq__

def __eq__(other) -> bool

Compare with another object.

VersionParams Objects

class VersionParams()

This class represents an instance of VersionParams.

__init__

def __init__(app_version: int)

Initialise an instance of BlockParams.

encode

@staticmethod
def encode(version_params_protobuf_object,
           version_params_object: "VersionParams") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the version_params_protobuf_object argument is matched with the instance of this class in the 'version_params_object' argument.

Arguments:

  • version_params_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • version_params_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, version_params_protobuf_object) -> "VersionParams"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'version_params_protobuf_object' argument.

Arguments:

  • version_params_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'version_params_protobuf_object' argument.

__eq__

def __eq__(other) -> bool

Compare with another object.

ConsensusParams Objects

class ConsensusParams()

This class represents an instance of ConsensusParams.

__init__

def __init__(block: "BlockParams", evidence_params: "EvidenceParams",
             validator_params: "ValidatorParams",
             version_params: "VersionParams")

Initialise an instance of ConsensusParams.

encode

@staticmethod
def encode(consensus_params_protobuf_object,
           consensus_params_object: Optional["ConsensusParams"]) -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the consensus_params_protobuf_object argument is matched with the instance of this class in the 'consensus_params_object' argument.

Arguments:

  • consensus_params_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • consensus_params_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, consensus_params_protobuf_object) -> "ConsensusParams"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'consensus_params_protobuf_object' argument.

Arguments:

  • consensus_params_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'consensus_params_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

EventAttribute Objects

class EventAttribute()

This class represents an instance of EventAttribute.

__init__

def __init__(key: bytes, value: bytes, index: bool)

Initialise an instance of EventAttribute.

encode

@staticmethod
def encode(event_attribute_protobuf_object,
           event_attribute_object: "EventAttribute") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the event_attribute_protobuf_object argument is matched with the instance of this class in the 'event_attribute_object' argument.

Arguments:

  • event_attribute_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • event_attribute_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, event_attribute_protobuf_object) -> "EventAttribute"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'event_attribute_protobuf_object' argument.

Arguments:

  • event_attribute_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'event_attribute_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

Event Objects

class Event()

This class represents an instance of Event.

__init__

def __init__(type_: str, attributes: List[EventAttribute])

Initialise an instance of Event.

encode

@staticmethod
def encode(event_protobuf_object, event_object: "Event") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the event_protobuf_object argument is matched with the instance of this class in the 'event_object' argument.

Arguments:

  • event_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • event_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, event_protobuf_object) -> "Event"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'event_protobuf_object' argument.

Arguments:

  • event_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'event_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

Events Objects

class Events()

This class represents an instance of Events.

__init__

def __init__(events: List[Event])

Initialise an instance of Events.

encode

@staticmethod
def encode(events_protobuf_object, events_object: "Events") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the events_protobuf_object argument is matched with the instance of this class in the 'events_object' argument.

Arguments:

  • events_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • events_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, events_protobuf_object) -> "Events"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'events_protobuf_object' argument.

Arguments:

  • events_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'events_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

EvidenceType Objects

class EvidenceType(Enum)

This class represent an instance of EvidenceType.

Evidence Objects

class Evidence()

This class represent an instance of Evidence.

__init__

def __init__(evidence_type: EvidenceType, validator: "Validator", height: int,
             time: "Timestamp", total_voting_power: int)

Initialise an instance of Evidences.

encode

@staticmethod
def encode(evidence_protobuf_object, evidence_object: "Evidence") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the evidence_protobuf_object argument is matched with the instance of this class in the 'evidence_object' argument.

Arguments:

  • evidence_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • evidence_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, evidence_protobuf_object) -> "Evidence"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'evidence_protobuf_object' argument.

Arguments:

  • evidence_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'evidence_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

Evidences Objects

class Evidences()

This class represents an instance of Evidences.

__init__

def __init__(byzantine_validators: List[Evidence])

Initialise an instance of Evidences.

encode

@staticmethod
def encode(evidences_protobuf_object, evidences_object: "Evidences") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the evidences_protobuf_object argument is matched with the instance of this class in the 'evidences_object' argument.

Arguments:

  • evidences_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • evidences_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, evidences_protobuf_object) -> "Evidences"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'evidences_protobuf_object' argument.

Arguments:

  • evidences_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'evidences_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

CheckTxTypeEnum Objects

class CheckTxTypeEnum(Enum)

CheckTxTypeEnum for tx check.

CheckTxType Objects

class CheckTxType()

This class represents an instance of CheckTxType.

__init__

def __init__(check_tx_type: CheckTxTypeEnum)

Initialise an instance of CheckTxType.

encode

@staticmethod
def encode(check_tx_type_protobuf_object,
           check_tx_type_object: "CheckTxType") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the check_tx_type_protobuf_object argument is matched with the instance of this class in the 'check_tx_type_object' argument.

Arguments:

  • check_tx_type_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • check_tx_type_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, check_tx_type_protobuf_object) -> "CheckTxType"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'check_tx_type_protobuf_object' argument.

Arguments:

  • check_tx_type_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'check_tx_type_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

ConsensusVersion Objects

class ConsensusVersion()

This class represents an instance of ConsensusVersion.

__init__

def __init__(block: int, app: int)

Initialise an instance of ConsensusVersion.

encode

@staticmethod
def encode(consensus_version_protobuf_object,
           consensus_version_object: "ConsensusVersion") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the consensus_version_protobuf_object argument is matched with the instance of this class in the 'consensus_version_object' argument.

Arguments:

  • consensus_version_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • consensus_version_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, consensus_version_protobuf_object) -> "ConsensusVersion"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'consensus_version_protobuf_object' argument.

Arguments:

  • consensus_version_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'consensus_version_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

PartSetHeader Objects

class PartSetHeader()

This class represents an instance of PartSetHeader.

__init__

def __init__(total: int, hash_: bytes)

Initialise an instance of PartSetHeader.

encode

@staticmethod
def encode(part_set_header_protobuf_object,
           part_set_header_object: "PartSetHeader") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the part_set_header_protobuf_object argument is matched with the instance of this class in the 'part_set_header_object' argument.

Arguments:

  • part_set_header_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • part_set_header_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, part_set_header_protobuf_object) -> "PartSetHeader"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'part_set_header_protobuf_object' argument.

Arguments:

  • part_set_header_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'part_set_header_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

BlockID Objects

class BlockID()

This class represents an instance of BlockID.

__init__

def __init__(hash_: bytes, part_set_header: PartSetHeader)

Initialise an instance of BlockID.

encode

@staticmethod
def encode(block_id_protobuf_object, block_id_object: "BlockID") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the block_id_protobuf_object argument is matched with the instance of this class in the 'block_id_object' argument.

Arguments:

  • block_id_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • block_id_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, block_id_protobuf_object) -> "BlockID"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'block_id_protobuf_object' argument.

Arguments:

  • block_id_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'block_id_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

Header Objects

class Header()

This class represents an instance of Header.

__init__

def __init__(version: ConsensusVersion, chain_id: str, height: int,
             time: "Timestamp", last_block_id: BlockID,
             last_commit_hash: bytes, data_hash: bytes, validators_hash: bytes,
             next_validators_hash: bytes, consensus_hash: bytes,
             app_hash: bytes, last_results_hash: bytes, evidence_hash: bytes,
             proposer_address: bytes)

Initialise an instance of Header.

timestamp

@property
def timestamp() -> datetime.datetime

Get the block timestamp.

encode

@staticmethod
def encode(header_protobuf_object, header_object: "Header") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the header_protobuf_object argument is matched with the instance of this class in the 'header_object' argument.

Arguments:

  • header_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • header_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, header_protobuf_object) -> "Header"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'header_protobuf_object' argument.

Arguments:

  • header_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'header_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

Validator Objects

class Validator()

This class represents an instance of Validator.

__init__

def __init__(address: bytes, power: int)

Initialise an instance of Validator.

encode

@staticmethod
def encode(validator_protobuf_object, validator_object: "Validator") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the validator_protobuf_object argument is matched with the instance of this class in the 'validator_object' argument.

Arguments:

  • validator_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • validator_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, validator_protobuf_object) -> "Validator"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'validator_protobuf_object' argument.

Arguments:

  • validator_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'validator_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

VoteInfo Objects

class VoteInfo()

This class represents an instance of VoteInfo.

__init__

def __init__(validator: Validator, signed_last_block: bool)

Initialise an instance of Validator.

encode

@staticmethod
def encode(vote_info_protobuf_object, vote_info_object: "VoteInfo") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the vote_info_protobuf_object argument is matched with the instance of this class in the 'vote_info_object' argument.

Arguments:

  • vote_info_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • vote_info_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, vote_info_protobuf_object) -> "VoteInfo"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'vote_info_protobuf_object' argument.

Arguments:

  • vote_info_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'vote_info_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

LastCommitInfo Objects

class LastCommitInfo()

This class represents an instance of LastCommitInfo.

__init__

def __init__(round_: int, votes: List[VoteInfo])

Initialise an instance of LastCommitInfo.

encode

@staticmethod
def encode(last_commit_info_protobuf_object,
           last_commit_info_object: "LastCommitInfo") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the last_commit_info_protobuf_object argument is matched with the instance of this class in the 'last_commit_info_object' argument.

Arguments:

  • last_commit_info_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • last_commit_info_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, last_commit_info_protobuf_object) -> "LastCommitInfo"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'last_commit_info_protobuf_object' argument.

Arguments:

  • last_commit_info_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'last_commit_info_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

ProofOp Objects

class ProofOp()

This class represents an instance of ProofOp.

__init__

def __init__(type_: str, key: bytes, data: bytes)

Initialise an instance of ProofOp.

ProofOp defines an operation used for calculating Merkle root The data could be arbitrary format, providing necessary data for example neighbouring node hash.

Arguments:

  • type_: the type
  • key: the key
  • data: the data

encode

@staticmethod
def encode(proof_op_protobuf_object, proof_op_object: "ProofOp") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the proof_op_protobuf_object argument is matched with the instance of this class in the 'proof_op_object' argument.

Arguments:

  • proof_op_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • proof_op_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, proof_op_protobuf_object) -> "ProofOp"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'proof_op_protobuf_object' argument.

Arguments:

  • proof_op_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'proof_op_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

ProofOps Objects

class ProofOps()

This class represents an instance of ProofOps.

__init__

def __init__(proof_ops: List[ProofOp])

Initialise an instance of ProofOps.

Arguments:

  • proof_ops: a list of ProofOp instances.

encode

@staticmethod
def encode(proof_ops_protobuf_object, proof_ops_object: "ProofOps") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the proof_ops_protobuf_object argument is matched with the instance of this class in the 'proof_ops_object' argument.

Arguments:

  • proof_ops_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • proof_ops_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, proof_ops_protobuf_object) -> "ProofOps"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'proof_ops_protobuf_object' argument.

Arguments:

  • proof_ops_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'proof_ops_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

ResultType Objects

class ResultType(Enum)

This class represents an instance of ResultType.

UNKNOWN

Unknown result, abort all snapshot restoration

ACCEPT

Snapshot accepted, apply chunks

ABORT

Abort all snapshot restoration

REJECT

Reject this specific snapshot, try others

REJECT_FORMAT

Reject all snapshots of this format, try others

REJECT_SENDER

Reject all snapshots from the sender(s), try others

Result Objects

class Result()

This class represents an instance of Result.

__init__

def __init__(result_type: ResultType)

Initialise an instance of Result.

encode

@staticmethod
def encode(result_protobuf_object, result_object: "Result") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the result_protobuf_object argument is matched with the instance of this class in the 'result_object' argument.

Arguments:

  • result_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • result_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, result_protobuf_object) -> "Result"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'result_protobuf_object' argument.

Arguments:

  • result_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'result_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

Snapshot Objects

class Snapshot()

This class represents an instance of Snapshot.

__init__

def __init__(height: int, format_: int, chunks: int, hash_: bytes,
             metadata: bytes)

Initialise an instance of Snapshot.

encode

@staticmethod
def encode(snapshot_protobuf_object, snapshot_object: "Snapshot") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the snapshot_protobuf_object argument is matched with the instance of this class in the 'snapshot_object' argument.

Arguments:

  • snapshot_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • snapshot_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, snapshot_protobuf_object) -> "Snapshot"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'snapshot_protobuf_object' argument.

Arguments:

  • snapshot_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'snapshot_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

SnapShots Objects

class SnapShots()

This class represents an instance of SnapShots.

__init__

def __init__(snapshots: List[Snapshot])

Initialise an instance of SnapShots.

encode

@staticmethod
def encode(snapshots_protobuf_object, snapshots_object: "SnapShots") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the snapshots_protobuf_object argument is matched with the instance of this class in the 'snapshots_object' argument.

Arguments:

  • snapshots_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • snapshots_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, snapshots_protobuf_object) -> "SnapShots"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'snapshots_protobuf_object' argument.

Arguments:

  • snapshots_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'snapshots_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

Timestamp Objects

class Timestamp()

This class represents an instance of Timestamp.

__init__

def __init__(seconds: int, nanos: int)

Initialise an instance of Timestamp.

Arguments:

  • seconds: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
  • nanos: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.

encode

@staticmethod
def encode(timestamp_protobuf_object, timestamp_object: "Timestamp") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the timestamp_protobuf_object argument is matched with the instance of this class in the 'timestamp_object' argument.

Arguments:

  • timestamp_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • timestamp_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, timestamp_protobuf_object) -> "Timestamp"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'timestamp_protobuf_object' argument.

Arguments:

  • timestamp_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'timestamp_protobuf_object' argument.

__eq__

def __eq__(other) -> bool

Compare with another object.

PublicKey Objects

class PublicKey()

This class represents an instance of PublicKey.

PublicKeyType Objects

class PublicKeyType(Enum)

Enumeration of public key types supported by Tendermint.

__init__

def __init__(data: bytes, key_type: PublicKeyType) -> None

Initialize the public key object.

Arguments:

  • data: the data of the public key.
  • key_type: the type of the public key.

encode

@staticmethod
def encode(public_key_protobuf_object, public_key_object: "PublicKey") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the public_key_protobuf_object argument is matched with the instance of this class in the 'public_key_object' argument.

Arguments:

  • public_key_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • public_key_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, public_key_protobuf_object) -> "PublicKey"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'public_key_protobuf_object' argument.

Arguments:

  • public_key_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'public_key_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

ValidatorUpdate Objects

class ValidatorUpdate()

This class represents an instance of ValidatorUpdate.

__init__

def __init__(pub_key: PublicKey, power: int)

Initialise an instance of ValidatorUpdate.

encode

@staticmethod
def encode(validator_update_protobuf_object,
           validator_update_object: "ValidatorUpdate") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the validator_update_protobuf_object argument is matched with the instance of this class in the 'validator_update_object' argument.

Arguments:

  • validator_update_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • validator_update_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, validator_update_protobuf_object) -> "ValidatorUpdate"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'validator_update_protobuf_object' argument.

Arguments:

  • validator_update_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'validator_update_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.

ValidatorUpdates Objects

class ValidatorUpdates()

This class represents an instance of ValidatorUpdates.

__init__

def __init__(validator_updates: List[ValidatorUpdate])

Initialise an instance of ValidatorUpdates.

encode

@staticmethod
def encode(validator_updates_protobuf_object,
           validator_updates_object: "ValidatorUpdates") -> None

Encode an instance of this class into the protocol buffer object.

The protocol buffer object in the validator_updates_protobuf_object argument is matched with the instance of this class in the 'validator_updates_object' argument.

Arguments:

  • validator_updates_protobuf_object: the protocol buffer object whose type corresponds with this class.
  • validator_updates_object: an instance of this class to be encoded in the protocol buffer object.

decode

@classmethod
def decode(cls, validator_updates_protobuf_object) -> "ValidatorUpdates"

Decode a protocol buffer object that corresponds with this class into an instance of this class.

A new instance of this class is created that matches the protocol buffer object in the 'validator_updates_protobuf_object' argument.

Arguments:

  • validator_updates_protobuf_object: the protocol buffer object whose type corresponds with this class.

Returns:

A new instance of this class that matches the protocol buffer object in the 'validator_updates_protobuf_object' argument.

__eq__

def __eq__(other)

Compare with another object.