@@ -3119,6 +3119,9 @@ async def wait_for_block(self, block: Optional[int] = None):
31193119 bool: True if the target block was reached, False if timeout occurred.
31203120
31213121 Example:
3122+ import bittensor as bt
3123+ subtensor = bt.Subtensor()
3124+
31223125 await subtensor.wait_for_block() # Waits for next block
31233126 await subtensor.wait_for_block(block=1234) # Waits for a specific block
31243127 """
@@ -3380,27 +3383,27 @@ async def add_stake(
33803383 period : Optional [int ] = None ,
33813384 ) -> bool :
33823385 """
3383- Adds the specified amount of stake to a neuron identified by the hotkey ``SS58`` address.
3384- Staking is a fundamental process in the Bittensor network that enables neurons to participate actively and earn
3385- incentives.
3386+ Adds a stake from the specified wallet to the neuron identified by the SS58 address of its hotkey in specified subnet.
3387+ Staking is a fundamental process in the Bittensor network that enables neurons to participate actively and earn incentives.
33863388
33873389 Args:
3388- wallet (bittensor_wallet.Wallet): The wallet to be used for staking.
3389- hotkey_ss58 (Optional[str]): The ``SS58`` address of the hotkey associated with the neuron.
3390- netuid: subnet UID
3391- amount (Balance): The amount of TAO to stake.
3392- wait_for_inclusion (bool): Waits for the transaction to be included in a block.
3393- wait_for_finalization (bool): Waits for the transaction to be finalized on the blockchain.
3394- safe_staking (bool): If true, enables price safety checks to protect against fluctuating prices. The stake
3395- will only execute if the price change doesn't exceed the rate tolerance. Default is False.
3396- allow_partial_stake (bool): If true and safe_staking is enabled, allows partial staking when
3397- the full amount would exceed the price threshold. If false, the entire stake fails if it would
3398- exceed the threshold. Default is False.
3399- rate_tolerance (float): The maximum allowed price change ratio when staking. For example,
3400- 0.005 = 0.5% maximum price increase. Only used when safe_staking is True. Default is 0.005.
3401- period (Optional[int]): The number of blocks during which the transaction will remain valid after it's
3402- submitted. If the transaction is not included in a block within that number of blocks, it will expire
3403- and be rejected. You can think of it as an expiration date for the transaction.
3390+ wallet: The wallet to be used for staking.
3391+ hotkey_ss58: The SS58 address of the hotkey associated with the neuron to which you intend to delegate your
3392+ stake. If not specified, the wallet's hotkey will be used. Defaults to ``None``.
3393+ netuid: The unique identifier of the subnet to which the neuron belongs.
3394+ amount: The amount of TAO to stake.
3395+ wait_for_inclusion: Waits for the transaction to be included in a block. Defaults to ``True``.
3396+ wait_for_finalization: Waits for the transaction to be finalized on the blockchain. Defaults to ``False``.
3397+ safe_staking: If true, enables price safety checks to protect against fluctuating prices. The stake will
3398+ only execute if the price change doesn't exceed the rate tolerance. Default is ``False``.
3399+ allow_partial_stake: If true and safe_staking is enabled, allows partial staking when the full amount would
3400+ exceed the price tolerance. If false, the entire stake fails if it would exceed the tolerance.
3401+ Default is ``False``.
3402+ rate_tolerance: The maximum allowed price change ratio when staking. For example,
3403+ 0.005 = 0.5% maximum price increase. Only used when safe_staking is True. Default is ``0.005``.
3404+ period: The number of blocks during which the transaction will remain valid after it's submitted. If the
3405+ transaction is not included in a block within that number of blocks, it will expire and be rejected. You
3406+ can think of it as an expiration date for the transaction. Defaults to ``None``.
34043407
34053408 Returns:
34063409 bool: ``True`` if the staking is successful, False otherwise.
@@ -4428,6 +4431,7 @@ async def unstake(
44284431 allow_partial_stake : bool = False ,
44294432 rate_tolerance : float = 0.005 ,
44304433 period : Optional [int ] = None ,
4434+ unstake_all : bool = False ,
44314435 ) -> bool :
44324436 """
44334437 Removes a specified amount of stake from a single hotkey account. This function is critical for adjusting
@@ -4451,6 +4455,7 @@ async def unstake(
44514455 period (Optional[int]): The number of blocks during which the transaction will remain valid after it's submitted. If
44524456 the transaction is not included in a block within that number of blocks, it will expire and be rejected.
44534457 You can think of it as an expiration date for the transaction.
4458+ unstake_all: If true, unstakes all tokens. Default is ``False``. If `True` amount is ignored.
44544459
44554460 Returns:
44564461 bool: ``True`` if the unstaking process is successful, False otherwise.
@@ -4471,6 +4476,7 @@ async def unstake(
44714476 allow_partial_stake = allow_partial_stake ,
44724477 rate_tolerance = rate_tolerance ,
44734478 period = period ,
4479+ unstake_all = unstake_all ,
44744480 )
44754481
44764482 async def unstake_multiple (
@@ -4482,6 +4488,7 @@ async def unstake_multiple(
44824488 wait_for_inclusion : bool = True ,
44834489 wait_for_finalization : bool = False ,
44844490 period : Optional [int ] = None ,
4491+ unstake_all : bool = False ,
44854492 ) -> bool :
44864493 """
44874494 Performs batch unstaking from multiple hotkey accounts, allowing a neuron to reduce its staked amounts
@@ -4499,6 +4506,7 @@ async def unstake_multiple(
44994506 period (Optional[int]): The number of blocks during which the transaction will remain valid after it's submitted. If
45004507 the transaction is not included in a block within that number of blocks, it will expire and be rejected.
45014508 You can think of it as an expiration date for the transaction.
4509+ unstake_all: If true, unstakes all tokens. Default is ``False``. If `True` amounts are ignored.
45024510
45034511 Returns:
45044512 bool: ``True`` if the batch unstaking is successful, False otherwise.
@@ -4515,6 +4523,7 @@ async def unstake_multiple(
45154523 wait_for_inclusion = wait_for_inclusion ,
45164524 wait_for_finalization = wait_for_finalization ,
45174525 period = period ,
4526+ unstake_all = unstake_all ,
45184527 )
45194528
45204529
0 commit comments