helium_py.api.validators.Validators

class helium_py.api.validators.Validators(host=None, port=None, user_agent=None, base_path=None)[source]

Bases: API

Validators client class for Helium Blockchain API.

https://docs.helium.com/api/blockchain/validators

__init__(host=None, port=None, user_agent=None, base_path=None)

Allow for overriding API details at instantiation.

Methods

__init__([host, port, user_agent, base_path])

Allow for overriding API details at instantiation.

all()

Yield all validators.

get_all_validator_rewards_total(params)

Return rewards totals for all validators.

get_currently_elected_validators()

Return currently elected validators.

get_elected_validators_by_election(election_hash)

Return elected validators for the provided block height.

get_elected_validators_by_height(height)

Return elected validators for the provided block height.

get_roles(address, params)

Yield all roles for provided validator address.

get_roles_counts(address, params)

Return roles counts for provided validator address.

get_stats()

Return stats for all validators.

get_validator_rewards(address, params)

Yield rewards information for a validator identified by validator_id.

get_validator_rewards_total(address, params)

Return rewards totals for a validator identified by validator_id.

validator_for_address(address)

Return validators for provided address.

validators_for_name(name)

Return validators identified by provided three-word animal name.

validators_search_by_name(name)

Search for validators by name.

Attributes

base_path

client

Return a client singleton per API.

host

port

user_agent

all() Generator[dict, None, None][source]

Yield all validators.

property client: Client

Return a client singleton per API.

get_all_validator_rewards_total(params: Optional[dict]) dict[source]

Return rewards totals for all validators.

get_currently_elected_validators() List[dict][source]

Return currently elected validators.

get_elected_validators_by_election(election_hash: str) List[dict][source]

Return elected validators for the provided block height.

get_elected_validators_by_height(height: int) List[dict][source]

Return elected validators for the provided block height.

get_roles(address: str, params: Optional[dict]) Generator[dict, None, None][source]

Yield all roles for provided validator address.

get_roles_counts(address: str, params: Optional[dict]) dict[source]

Return roles counts for provided validator address.

get_stats() dict[source]

Return stats for all validators.

get_validator_rewards(address: str, params: Optional[dict]) Generator[dict, None, None][source]

Yield rewards information for a validator identified by validator_id.

get_validator_rewards_total(address: str, params: Optional[dict]) dict[source]

Return rewards totals for a validator identified by validator_id.

validator_for_address(address: str) dict[source]

Return validators for provided address.

validators_for_name(name: str) List[dict][source]

Return validators identified by provided three-word animal name.

validators_search_by_name(name: str) List[dict][source]

Search for validators by name.