bittensor.core.extrinsics.asyncex.registration#
This module provides async functionalities for registering a wallet with the subtensor network.
Functions#
|
Registers the wallet to chain by recycling TAO. |
|
Registers the wallet to chain by recycling TAO, with a maximum burn price limit. |
|
Registers a new subnetwork on the Bittensor blockchain asynchronously. |
|
Set the identity information for a given subnet. |
Module Contents#
- async bittensor.core.extrinsics.asyncex.registration.burned_register_extrinsic(subtensor, wallet, netuid, *, mev_protection=DEFAULT_MEV_PROTECTION, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True, wait_for_revealed_execution=True)#
Registers the wallet to chain by recycling TAO.
- Parameters:
subtensor (bittensor.core.async_subtensor.AsyncSubtensor) – Subtensor instance.
wallet (bittensor_wallet.Wallet) – Bittensor wallet object.
netuid (int) – The
netuidof the subnet to register on.mev_protection (bool) – If True, encrypts and submits the transaction through the MEV Shield pallet to protect against front-running and MEV attacks. The transaction remains encrypted in the mempool until validators decrypt and execute it. If False, submits the transaction directly without encryption.
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.
raise_error (bool) – Raises a relevant exception rather than returning False if unsuccessful.
wait_for_inclusion (bool) – Whether to wait for the inclusion of the transaction.
wait_for_finalization (bool) – Whether to wait for the finalization of the transaction.
wait_for_revealed_execution (bool) – Whether to wait for the revealed execution of transaction if mev_protection used.
- Returns:
The result object of the extrinsic execution.
- Return type:
- async bittensor.core.extrinsics.asyncex.registration.register_limit_extrinsic(subtensor, wallet, netuid, limit_price, *, mev_protection=DEFAULT_MEV_PROTECTION, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True, wait_for_revealed_execution=True)#
Registers the wallet to chain by recycling TAO, with a maximum burn price limit.
- Parameters:
subtensor (bittensor.core.async_subtensor.AsyncSubtensor) – Subtensor instance.
wallet (bittensor_wallet.Wallet) – Bittensor wallet object.
netuid (int) – The
netuidof the subnet to register on.limit_price (bittensor.utils.balance.Balance) – Maximum acceptable burn price as a Balance instance. If the on-chain burn price exceeds this value, the transaction will fail with RegistrationPriceLimitExceeded.
mev_protection (bool) – If True, encrypts and submits the transaction through the MEV Shield pallet to protect against front-running and MEV attacks. The transaction remains encrypted in the mempool until validators decrypt and execute it. If False, submits the transaction directly without encryption.
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.
raise_error (bool) – Raises a relevant exception rather than returning False if unsuccessful.
wait_for_inclusion (bool) – Whether to wait for the inclusion of the transaction.
wait_for_finalization (bool) – Whether to wait for the finalization of the transaction.
wait_for_revealed_execution (bool) – Whether to wait for the revealed execution of transaction if mev_protection used.
- Returns:
The result object of the extrinsic execution.
- Return type:
- async bittensor.core.extrinsics.asyncex.registration.register_subnet_extrinsic(subtensor, wallet, *, mev_protection=DEFAULT_MEV_PROTECTION, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True, wait_for_revealed_execution=True)#
Registers a new subnetwork on the Bittensor blockchain asynchronously.
- Parameters:
subtensor (bittensor.core.async_subtensor.AsyncSubtensor) – The subtensor interface to send the extrinsic.
wallet (bittensor_wallet.Wallet) – The wallet to be used for subnet registration.
mev_protection (bool) – If True, encrypts and submits the transaction through the MEV Shield pallet to protect against front-running and MEV attacks. The transaction remains encrypted in the mempool until validators decrypt and execute it. If False, submits the transaction directly without encryption.
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.
raise_error (bool) – Raises a relevant exception rather than returning False if unsuccessful.
wait_for_inclusion (bool) – Whether to wait for the inclusion of the transaction.
wait_for_finalization (bool) – Whether to wait for the finalization of the transaction.
wait_for_revealed_execution (bool) – Whether to wait for the revealed execution of transaction if mev_protection used.
- Returns:
The result object of the extrinsic execution.
- Return type:
- async bittensor.core.extrinsics.asyncex.registration.set_subnet_identity_extrinsic(subtensor, wallet, netuid, subnet_name, github_repo, subnet_contact, subnet_url, logo_url, discord, description, additional, *, mev_protection=DEFAULT_MEV_PROTECTION, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True, wait_for_revealed_execution=True)#
Set the identity information for a given subnet.
- Parameters:
subtensor (bittensor.core.async_subtensor.AsyncSubtensor) – An instance of the Subtensor class to interact with the blockchain.
wallet (bittensor_wallet.Wallet) – A wallet instance used to sign and submit the extrinsic.
netuid (int) – The unique ID for the subnet.
subnet_name (str) – The name of the subnet to assign the identity information.
github_repo (str) – URL of the GitHub repository related to the subnet.
subnet_contact (str) – Subnet’s contact information, e.g., email or contact link.
subnet_url (str) – The URL of the subnet’s primary web portal.
logo_url (str) – The URL of the logo’s primary web portal.
discord (str) – Discord server or contact for the subnet.
description (str) – A textual description of the subnet.
additional (str) – Any additional metadata or information related to the subnet.
mev_protection (bool) – If True, encrypts and submits the transaction through the MEV Shield pallet to protect against front-running and MEV attacks. The transaction remains encrypted in the mempool until validators decrypt and execute it. If False, submits the transaction directly without encryption.
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.
raise_error (bool) – Raises a relevant exception rather than returning False if unsuccessful.
wait_for_inclusion (bool) – Whether to wait for the inclusion of the transaction.
wait_for_finalization (bool) – Whether to wait for the finalization of the transaction.
wait_for_revealed_execution (bool) – Whether to wait for the revealed execution of transaction if mev_protection used.
- Returns:
The result object of the extrinsic execution.
- Return type: