bittensor.core.chain_data.delegate_info#

Classes#

DelegateInfo

Dataclass for delegate information. For a lighter version of this class, see bittensor.core.chain_data.delegate_info_lite.

Module Contents#

class bittensor.core.chain_data.delegate_info.DelegateInfo[source]#

Dataclass for delegate information. For a lighter version of this class, see bittensor.core.chain_data.delegate_info_lite.

Parameters:
  • hotkey_ss58 (str) – Hotkey of the delegate for which the information is being fetched.

  • total_stake (int) – Total stake of the delegate.

  • nominators (list[tuple[str, int]]) – List of nominators of the delegate and their stake.

  • take (float) – Take of the delegate as a percentage.

  • owner_ss58 (str) – Coldkey of the owner.

  • registrations (list[int]) – List of subnets that the delegate is registered on.

  • validator_permits (list[int]) – List of subnets that the delegate is allowed to validate on.

  • return_per_1000 (int) – Return per 1000 TAO, for the delegate over a day.

  • total_daily_return (int) – Total daily return of the delegate.

hotkey_ss58: str#
total_stake: bittensor.utils.balance.Balance#
nominators: list[tuple[str, bittensor.utils.balance.Balance]]#
owner_ss58: str#
take: float#
validator_permits: list[int]#
registrations: tuple[int]#
return_per_1000: bittensor.utils.balance.Balance#
total_daily_return: bittensor.utils.balance.Balance#
classmethod fix_decoded_values(decoded)[source]#

Fixes the decoded values.

Parameters:

decoded (Any)

Return type:

DelegateInfo

classmethod from_vec_u8(vec_u8)[source]#

Returns a DelegateInfo object from a vec_u8.

Parameters:

vec_u8 (list[int])

Return type:

Optional[DelegateInfo]

classmethod list_from_vec_u8(vec_u8)[source]#

Returns a list of DelegateInfo objects from a vec_u8.

Parameters:

vec_u8 (list[int])

Return type:

list[DelegateInfo]

classmethod delegated_list_from_vec_u8(vec_u8)[source]#

Returns a list of Tuples of DelegateInfo objects, and Balance, from a vec_u8.

This is the list of delegates that the user has delegated to, and the amount of stake delegated.

Parameters:

vec_u8 (list[int])

Return type:

list[tuple[DelegateInfo, bittensor.utils.balance.Balance]]