@@ -1785,7 +1785,7 @@ async def get_delegate_take(
1785
1785
percentage of rewards that the delegate claims from its nominators' stakes.
1786
1786
1787
1787
Arguments:
1788
- hotkey_ss58: The `SS58` address of the neuron's hotkey.
1788
+ hotkey_ss58: The `` SS58` ` address of the neuron's hotkey.
1789
1789
block: The blockchain block number for the query.
1790
1790
block_hash: The hash of the block to retrieve the subnet unique identifiers from.
1791
1791
reuse_block: Whether to reuse the last-used block hash.
@@ -2091,7 +2091,7 @@ async def get_netuids_for_hotkey(
2091
2091
specific subnets within the Bittensor network where the neuron associated with the hotkey is active.
2092
2092
2093
2093
Arguments:
2094
- hotkey_ss58: The `SS58` address of the neuron's hotkey.
2094
+ hotkey_ss58: The `` SS58` ` address of the neuron's hotkey.
2095
2095
block: The blockchain block number for the query.
2096
2096
block_hash: The hash of the blockchain block number at which to perform the query.
2097
2097
reuse_block: Whether to reuse the last-used block hash when retrieving info.
@@ -3107,7 +3107,7 @@ async def get_uid_for_hotkey_on_subnet(
3107
3107
Retrieves the unique identifier (UID) for a neuron's hotkey on a specific subnet.
3108
3108
3109
3109
Arguments:
3110
- hotkey_ss58: The `SS58` address of the neuron's hotkey.
3110
+ hotkey_ss58: The `` SS58` ` address of the neuron's hotkey.
3111
3111
netuid: The unique identifier of the subnet.
3112
3112
block: The blockchain block number for the query.
3113
3113
block_hash: The blockchain block_hash representation of the block id.
@@ -3307,7 +3307,7 @@ async def is_hotkey_registered_any(
3307
3307
Checks if a neuron's hotkey is registered on any subnet within the Bittensor network.
3308
3308
3309
3309
Arguments:
3310
- hotkey_ss58: The `SS58` address of the neuron's hotkey.
3310
+ hotkey_ss58: The `` SS58` ` address of the neuron's hotkey.
3311
3311
block: The blockchain block number for the query.
3312
3312
block_hash: The blockchain block_hash representation of block id.
3313
3313
reuse_block: Whether to reuse the last-used block hash.
@@ -3358,9 +3358,9 @@ async def is_subnet_active(
3358
3358
reuse_block: Whether to reuse the last-used block hash.
3359
3359
3360
3360
Returns:
3361
- `True` if subnet is active, `False` otherwise.
3361
+ `` True`` if subnet is active, `` False` ` otherwise.
3362
3362
3363
- This means whether the `start_call` was initiated or not.
3363
+ Note: This means whether the `` start_call` ` was initiated or not.
3364
3364
"""
3365
3365
query = await self .query_subtensor (
3366
3366
name = "FirstEmissionBlockNumber" ,
@@ -3400,7 +3400,7 @@ async def max_weight_limit(
3400
3400
reuse_block: Whether to reuse the last-used block hash.
3401
3401
3402
3402
Returns:
3403
- Optional[float]: The value of the MaxWeightsLimit hyperparameter, or `None` if the subnetwork does not
3403
+ Optional[float]: The value of the MaxWeightsLimit hyperparameter, or `` None` ` if the subnetwork does not
3404
3404
exist or the parameter is not found.
3405
3405
"""
3406
3406
block_hash = await self .determine_block_hash (block , block_hash , reuse_block )
@@ -3422,7 +3422,7 @@ async def metagraph(
3422
3422
Arguments:
3423
3423
netuid: The network UID of the subnet to query.
3424
3424
lite: If true, returns a metagraph using a lightweight sync (no weights, no bonds). Default is
3425
- `True`.
3425
+ `` True` `.
3426
3426
block: Block number for synchronization, or `None` for the latest block.
3427
3427
3428
3428
Returns:
@@ -3460,7 +3460,7 @@ async def min_allowed_weights(
3460
3460
reuse_block: Whether to reuse the last-used block hash.
3461
3461
3462
3462
Returns:
3463
- Optional[int]: The value of the MinAllowedWeights hyperparameter, or `None` if the subnetwork does not
3463
+ Optional[int]: The value of the MinAllowedWeights hyperparameter, or `` None` ` if the subnetwork does not
3464
3464
exist or the parameter is not found.
3465
3465
"""
3466
3466
block_hash = await self .determine_block_hash (block , block_hash , reuse_block )
@@ -3611,13 +3611,13 @@ async def query_identity(
3611
3611
reuse_block: Whether to reuse the last-used blockchain block hash.
3612
3612
3613
3613
Returns:
3614
- An object containing the identity information of the neuron if found, `None` otherwise.
3614
+ An object containing the identity information of the neuron if found, `` None` ` otherwise.
3615
3615
3616
3616
The identity information can include various attributes such as the neuron's stake, rank, and other
3617
3617
network-specific details, providing insights into the neuron's role and status within the Bittensor network.
3618
3618
3619
3619
Note:
3620
- See the `Bittensor CLI documentation <https://docs.bittensor.com/reference/btcli>`_ for supported identity
3620
+ See the `` Bittensor CLI documentation <https://docs.bittensor.com/reference/btcli>` `_ for supported identity
3621
3621
parameters.
3622
3622
"""
3623
3623
block_hash = await self .determine_block_hash (block , block_hash , reuse_block )
@@ -3657,7 +3657,7 @@ async def recycle(
3657
3657
reuse_block: Whether to reuse the last-used blockchain block hash.
3658
3658
3659
3659
Returns:
3660
- Optional[Balance]: The value of the 'Burn' hyperparameter if the subnet exists, None otherwise.
3660
+ Optional[Balance]: The value of the 'Burn' hyperparameter if the subnet exists, `` None`` otherwise.
3661
3661
3662
3662
Understanding the 'Burn' rate is essential for analyzing the network registration usage, particularly how it is
3663
3663
correlated with user activity and the overall cost of participation in a given subnet.
@@ -3688,14 +3688,14 @@ async def set_reveal_commitment(
3688
3688
netuid: The unique identifier of the subnetwork.
3689
3689
data: The data to be committed to the network.
3690
3690
blocks_until_reveal: The number of blocks from now after which the data will be revealed.
3691
- Defaults to `360` (the number of blocks in one epoch).
3692
- block_time: The number of seconds between each block. Defaults to `12 `.
3691
+ Defaults to `` 360` ` (the number of blocks in one epoch).
3692
+ block_time: The number of seconds between each block. Defaults to ``12` `.
3693
3693
period: The number of blocks during which the transaction will remain valid after it's
3694
3694
submitted. If the transaction is not included in a block within that number of blocks, it will expire
3695
3695
and be rejected. You can think of it as an expiration date for the transaction.
3696
3696
3697
3697
Returns:
3698
- bool: `True` if the commitment was successful, `False` otherwise.
3698
+ bool: `` True`` if the commitment was successful, `` False` ` otherwise.
3699
3699
3700
3700
Note: A commitment can be set once per subnet epoch and is reset at the next epoch in the chain automatically.
3701
3701
"""
@@ -3769,7 +3769,7 @@ async def subnet_exists(
3769
3769
reuse_block: Whether to reuse the last-used block hash.
3770
3770
3771
3771
Returns:
3772
- `True` if the subnet exists, `False` otherwise.
3772
+ `` True`` if the subnet exists, `` False` ` otherwise.
3773
3773
3774
3774
This function is critical for verifying the presence of specific subnets in the network,
3775
3775
enabling a deeper understanding of the network's structure and composition.
@@ -3801,7 +3801,7 @@ async def subnetwork_n(
3801
3801
reuse_block: Whether to reuse the last-used block hash.
3802
3802
3803
3803
Returns:
3804
- Optional[int]: The value of the SubnetworkN hyperparameter, or `None` if the subnetwork does not exist or
3804
+ Optional[int]: The value of the SubnetworkN hyperparameter, or `` None` ` if the subnetwork does not exist or
3805
3805
the parameter is not found.
3806
3806
"""
3807
3807
block_hash = await self .determine_block_hash (block , block_hash , reuse_block )
@@ -3830,7 +3830,7 @@ async def tempo(
3830
3830
reuse_block: Whether to reuse the last-used block hash.
3831
3831
3832
3832
Returns:
3833
- Optional[int]: The value of the Tempo hyperparameter, or `None` if the subnetwork does not exist or the
3833
+ Optional[int]: The value of the Tempo hyperparameter, or `` None` ` if the subnetwork does not exist or the
3834
3834
parameter is not found.
3835
3835
"""
3836
3836
block_hash = await self .determine_block_hash (block , block_hash , reuse_block )
@@ -3858,7 +3858,7 @@ async def tx_rate_limit(
3858
3858
reuse_block: Whether to reuse the last-used block hash.
3859
3859
3860
3860
Returns:
3861
- Optional[int]: The transaction rate limit of the network, None if not available.
3861
+ Optional[int]: The transaction rate limit of the network, `` None`` if not available.
3862
3862
3863
3863
The transaction rate limit is an essential parameter for ensuring the stability and scalability of the Bittensor
3864
3864
network. It helps in managing network load and preventing congestion, thereby maintaining efficient and
@@ -3876,10 +3876,10 @@ async def wait_for_block(self, block: Optional[int] = None):
3876
3876
waits for the next block.
3877
3877
3878
3878
Arguments:
3879
- block: The block number to wait for. If None, waits for the next block.
3879
+ block: The block number to wait for. If `` None`` , waits for the next block.
3880
3880
3881
3881
Returns:
3882
- bool: True if the target block was reached, False if timeout occurred.
3882
+ bool: `` True`` if the target block was reached, `` False`` if timeout occurred.
3883
3883
3884
3884
Example:
3885
3885
import bittensor as bt
@@ -3966,7 +3966,7 @@ async def weights_rate_limit(
3966
3966
reuse_block: Whether to reuse the last-used blockchain block hash.
3967
3967
3968
3968
Returns:
3969
- Optional[int]: The value of the WeightsSetRateLimit hyperparameter, or `None` if the subnetwork does not
3969
+ Optional[int]: The value of the WeightsSetRateLimit hyperparameter, or `` None` ` if the subnetwork does not
3970
3970
exist or the parameter is not found.
3971
3971
"""
3972
3972
block_hash = await self .determine_block_hash (block , block_hash , reuse_block )
@@ -4076,7 +4076,7 @@ async def sign_and_send_extrinsic(
4076
4076
and be rejected. You can think of it as an expiration date for the transaction.
4077
4077
nonce_key: the type on nonce to use. Options are "hotkey" or "coldkey".
4078
4078
nonce_key: the type on nonce to use. Options are "hotkey", "coldkey", or "coldkeypub".
4079
- raise_error: raises a relevant exception rather than returning `False` if unsuccessful.
4079
+ raise_error: raises a relevant exception rather than returning `` False` ` if unsuccessful.
4080
4080
4081
4081
Returns:
4082
4082
(success, error message)
@@ -4153,24 +4153,24 @@ async def add_stake(
4153
4153
Arguments:
4154
4154
wallet: The wallet to be used for staking.
4155
4155
hotkey_ss58: The SS58 address of the hotkey associated with the neuron to which you intend to delegate your
4156
- stake. If not specified, the wallet's hotkey will be used. Defaults to `None`.
4156
+ stake. If not specified, the wallet's hotkey will be used. Defaults to `` None` `.
4157
4157
netuid: The unique identifier of the subnet to which the neuron belongs.
4158
4158
amount: The amount of TAO to stake.
4159
4159
wait_for_inclusion: Waits for the transaction to be included in a block. Defaults to `True`.
4160
4160
wait_for_finalization: Waits for the transaction to be finalized on the blockchain. Defaults to `False`.
4161
4161
safe_staking: If true, enables price safety checks to protect against fluctuating prices. The stake will
4162
- only execute if the price change doesn't exceed the rate tolerance. Default is `False`.
4162
+ only execute if the price change doesn't exceed the rate tolerance. Default is `` False` `.
4163
4163
allow_partial_stake: If true and safe_staking is enabled, allows partial staking when the full amount would
4164
4164
exceed the price tolerance. If false, the entire stake fails if it would exceed the tolerance.
4165
- Default is `False`.
4165
+ Default is `` False` `.
4166
4166
rate_tolerance: The maximum allowed price change ratio when staking. For example,
4167
4167
0.005 = 0.5% maximum price increase. Only used when safe_staking is True. Default is ``0.005``.
4168
4168
period: The number of blocks during which the transaction will remain valid after it's submitted. If the
4169
4169
transaction is not included in a block within that number of blocks, it will expire and be rejected. You
4170
- can think of it as an expiration date for the transaction. Defaults to `None`.
4170
+ can think of it as an expiration date for the transaction. Defaults to `` None` `.
4171
4171
4172
4172
Returns:
4173
- bool: `True` if the staking is successful, False otherwise.
4173
+ bool: `` True`` if the staking is successful, `` False`` otherwise.
4174
4174
4175
4175
This function enables neurons to increase their stake in the network, enhancing their influence and potential.
4176
4176
When safe_staking is enabled, it provides protection against price fluctuations during the time stake is
@@ -4225,7 +4225,7 @@ async def add_liquidity(
4225
4225
- True and a success message if the extrinsic is successfully submitted or processed.
4226
4226
- False and an error message if the submission fails or the wallet cannot be unlocked.
4227
4227
4228
- Note: Adding is allowed even when user liquidity is enabled in specified subnet. Call `toggle_user_liquidity`
4228
+ Note: Adding is allowed even when user liquidity is enabled in specified subnet. Call `` toggle_user_liquidity` `
4229
4229
method to enable/disable user liquidity.
4230
4230
"""
4231
4231
return await add_liquidity_extrinsic (
@@ -4256,14 +4256,14 @@ async def add_stake_multiple(
4256
4256
4257
4257
Arguments:
4258
4258
wallet: The wallet used for staking.
4259
- hotkey_ss58s: List of `SS58` addresses of hotkeys to stake to.
4259
+ hotkey_ss58s: List of `` SS58` ` addresses of hotkeys to stake to.
4260
4260
netui: list of subnet UIDs
4261
4261
amounts: Corresponding amounts of TAO to stake for each hotkey.
4262
4262
wait_for_inclusion: Waits for the transaction to be included in a block. Defaults to `True`.
4263
4263
wait_for_finalization: Waits for the transaction to be finalized on the blockchain. Defaults to `False`.
4264
4264
4265
4265
Returns:
4266
- bool: `True` if the staking is successful for all specified neurons, False otherwise.
4266
+ bool: `` True`` if the staking is successful for all specified neurons, `` False`` otherwise.
4267
4267
4268
4268
This function is essential for managing stakes across multiple neurons, reflecting the dynamic and collaborative
4269
4269
nature of the Bittensor network.
@@ -4294,7 +4294,7 @@ async def burned_register(
4294
4294
wallet: The wallet associated with the neuron to be registered.
4295
4295
netuid: The unique identifier of the subnet.
4296
4296
wait_for_inclusion: Waits for the transaction to be included in a block. Defaults to
4297
- `False`.
4297
+ `` False` `.
4298
4298
wait_for_finalization: Waits for the transaction to be finalized on the blockchain.
4299
4299
period: The number of blocks during which the transaction will remain valid after it's
4300
4300
submitted. If the transaction is not included in a block within that number of blocks, it will expire
@@ -4911,11 +4911,11 @@ async def set_delegate_take(
4911
4911
4912
4912
Arguments:
4913
4913
wallet: bittensor wallet instance.
4914
- hotkey_ss58: The `SS58` address of the neuron's hotkey.
4914
+ hotkey_ss58: The `` SS58` ` address of the neuron's hotkey.
4915
4915
take: Percentage reward for the delegate.
4916
4916
wait_for_inclusion: Waits for the transaction to be included in a block.
4917
4917
wait_for_finalization: Waits for the transaction to be finalized on_error: Raises a relevant exception
4918
- rather than returning `False` if unsuccessful.
4918
+ rather than returning `` False` ` if unsuccessful.
4919
4919
period: The number of blocks during which the transaction will remain valid after it's
4920
4920
submitted. If the transaction is not included in a block within that number of blocks, it will expire
4921
4921
and be rejected. You can think of it as an expiration date for the transaction.
@@ -5568,27 +5568,27 @@ async def unstake_multiple(
5568
5568
unstake_all : bool = False ,
5569
5569
) -> bool :
5570
5570
"""
5571
- Performs batch unstaking from multiple hotkey accounts, allowing a neuron to reduce its staked amounts
5572
- efficiently. This function is useful for managing the distribution of stakes across multiple neurons.
5573
-
5574
- Arguments:
5575
- wallet: The wallet linked to the coldkey from which the stakes are being
5576
- withdrawn.
5577
- hotkey_ss58s: A list of hotkey `SS58` addresses to unstake from.
5578
- netuids: Subnets unique IDs.
5579
- amounts: The amounts of TAO to unstake from each hotkey. If not provided, unstakes all.
5580
- wait_for_inclusion: Waits for the transaction to be included in a block.
5581
- wait_for_finalization: Waits for the transaction to be finalized on the blockchain.
5582
- period: The number of blocks during which the transaction will remain valid after it's
5583
- submitted. If the transaction is not included in a block within that number of blocks, it will expire
5584
- and be rejected. You can think of it as an expiration date for the transaction.
5585
- unstake_all: If true, unstakes all tokens. Default is `False`. If `True` amounts are ignored.
5586
-
5587
- Returns:
5588
- bool: `True` if the batch unstaking is successful, False otherwise.
5589
-
5590
- This function allows for strategic reallocation or withdrawal of stakes, aligning with the dynamic stake
5591
- management aspect of the Bittensor network.
5571
+ Performs batch unstaking from multiple hotkey accounts, allowing a neuron to reduce its staked amounts
5572
+ efficiently. This function is useful for managing the distribution of stakes across multiple neurons.
5573
+
5574
+ Arguments:
5575
+ wallet: The wallet linked to the coldkey from which the stakes are being
5576
+ withdrawn.
5577
+ hotkey_ss58s: A list of hotkey `SS58` addresses to unstake from.
5578
+ netuids: Subnets unique IDs.
5579
+ amounts: The amounts of TAO to unstake from each hotkey. If not provided, unstakes all.
5580
+ wait_for_inclusion: Waits for the transaction to be included in a block.
5581
+ wait_for_finalization: Waits for the transaction to be finalized on the blockchain.
5582
+ period: The number of blocks during which the transaction will remain valid after it's
5583
+ submitted. If the transaction is not included in a block within that number of blocks, it will expire
5584
+ and be rejected. You can think of it as an expiration date for the transaction.
5585
+ unstake_all: If true, unstakes all tokens. Default is `False`. If `True` amounts are ignored.
5586
+
5587
+ Returns:
5588
+ bool: `True` if the batch unstaking is successful, False otherwise.
5589
+
5590
+ This function allows for strategic reallocation or withdrawal of stakes, aligning with the dynamic stake
5591
+ management aspect of the Bittensor network.
5592
5592
"""
5593
5593
return await unstake_multiple_extrinsic (
5594
5594
subtensor = self ,
0 commit comments