bittensor.core.extrinsics.asyncex.root#
Functions#
|
Registers the wallet to the root network. |
|
Sets the given weights and values on a chain for a wallet hotkey account. |
Module Contents#
- async bittensor.core.extrinsics.asyncex.root.root_register_extrinsic(subtensor, wallet, wait_for_inclusion=True, wait_for_finalization=True, period=None)[source]#
Registers the wallet to the root network.
- Parameters:
subtensor (bittensor.core.async_subtensor.AsyncSubtensor) – The AsyncSubtensor object
wallet (bittensor_wallet.Wallet) – Bittensor wallet object.
wait_for_inclusion (bool) – 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.
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.
period (Optional[int]) – The number of blocks during which the transaction will remain valid after it’s submitted. If the transaction is not included in a block within that number of blocks, it will expire and be rejected. You can think of it as an expiration date for the transaction.
- Returns:
- True if extrinsic was finalized or included in the block. If we did not wait for finalization/inclusion,
the response is True.
- Return type:
- async bittensor.core.extrinsics.asyncex.root.set_root_weights_extrinsic(subtensor, wallet, netuids, weights, version_key=0, wait_for_inclusion=False, wait_for_finalization=False, period=None)[source]#
Sets the given weights and values on a chain for a wallet hotkey account.
- Parameters:
subtensor (bittensor.core.async_subtensor.AsyncSubtensor) – The AsyncSubtensor object
wallet (bittensor_wallet.Wallet) – Bittensor wallet object.
netuids (Union[NDArray[np.int64], list[int]]) – The netuid of the subnet to set weights for.
weights (Union[NDArray[np.float32], list[Float]]) – Weights to set. These must be Float`s and must correspond to the passed `netuid s.
version_key (int) – The version key of the validator.
wait_for_inclusion (bool) – 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.
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.
period (Optional[int]) – The number of blocks during which the transaction will remain valid after it’s submitted. If the transaction is not included in a block within that number of blocks, it will expire and be rejected. You can think of it as an expiration date for the transaction.
- Returns:
- True if extrinsic was finalized or included in the block. If we did not wait for finalization/inclusion, the
response is True.
- Return type: