bittensor.utils.subnets#
Classes#
This class is not used within the bittensor package, but is actively used by the community. |
Module Contents#
- class bittensor.utils.subnets.SubnetsAPI(wallet)#
Bases:
abc.ABCThis class is not used within the bittensor package, but is actively used by the community.
- Parameters:
wallet (bittensor_wallet.Wallet)
- dendrite#
- abstractmethod prepare_synapse(*args, **kwargs)#
Prepare the synapse-specific payload.
- Return type:
- abstractmethod process_responses(responses)#
Process the responses from the network.
- Parameters:
responses (list[Union[bittensor.core.synapse.Synapse, Any]])
- Return type:
- async query_api(axons, deserialize=False, timeout=12, **kwargs)#
Queries the API nodes of a subnet using the given synapse and bespoke query function.
- Parameters:
axons (Union[bittensor.core.axon.Axon, list[bittensor.core.axon.Axon]]) – The list of axon(s) to query.
deserialize (Optional[bool]) – Whether to deserialize the responses.
timeout (Optional[int]) – The timeout in seconds for the query.
**kwargs – Keyword arguments for the prepare_synapse_fn.
- Returns:
The result of the process_responses_fn.
- Return type:
- wallet#