bittensor.extrinsics.root
#
Module Contents#
Functions#
|
Registers the wallet to root network. |
|
Sets the given weights and values on chain for wallet hotkey account. |
Attributes#
- bittensor.extrinsics.root.logger#
- bittensor.extrinsics.root.root_register_extrinsic(subtensor, wallet, wait_for_inclusion=False, wait_for_finalization=True, prompt=False)#
Registers the wallet to root network. :param wallet: bittensor wallet object. :type wallet: bittensor.wallet :param wait_for_inclusion: If set, waits for the extrinsic to enter a block before returning true,
or returns false if the extrinsic fails to enter the block within the timeout.
- Parameters:
wait_for_finalization (bool) – If set, waits for the extrinsic to be finalized on the chain before returning true, or returns false if the extrinsic fails to be finalized within the timeout.
prompt (bool) – If true, the call waits for confirmation from the user before proceeding.
subtensor (bittensor.subtensor) –
wallet (bittensor.wallet) –
wait_for_inclusion (bool) –
- Returns:
flag is true if extrinsic was finalized or uncluded in the block. If we did not wait for finalization / inclusion, the response is true.
- Return type:
success (bool)
- bittensor.extrinsics.root.set_root_weights_extrinsic(subtensor, wallet, netuids, weights, version_key=0, wait_for_inclusion=False, wait_for_finalization=False, prompt=False)#
Sets the given weights and values on chain for wallet hotkey account. :param wallet: bittensor wallet object. :type wallet: bittensor.wallet :param netuids: netuid of the subent to set weights for. :type netuids: List[int] :param weights: weights to set which must floats and correspond to the passed uids. :type weights: Union[torch.FloatTensor, list] :param version_key: version key of the validator. :type version_key: int :param wait_for_inclusion: if set, waits for the extrinsic to enter a block before returning true,
or returns false if the extrinsic fails to enter the block within the timeout.
- Parameters:
wait_for_finalization (bool) – if set, waits for the extrinsic to be finalized on the chain before returning true, or returns false if the extrinsic fails to be finalized within the timeout.
prompt (bool) – If true, the call waits for confirmation from the user before proceeding.
subtensor (bittensor.subtensor) –
wallet (bittensor.wallet) –
netuids (Union[torch.LongTensor, list]) –
weights (Union[torch.FloatTensor, list]) –
version_key (int) –
wait_for_inclusion (bool) –
- Returns:
flag is true if extrinsic was finalized or uncluded in the block. If we did not wait for finalization / inclusion, the response is true.
- Return type:
success (bool)