bittensor.core.extrinsics.unstaking#
Functions#
|
Removes stake into the wallet coldkey from the specified hotkey |
|
Removes stake from each |
Module Contents#
- bittensor.core.extrinsics.unstaking.unstake_extrinsic(subtensor, wallet, hotkey_ss58=None, netuid=None, amount=None, wait_for_inclusion=True, wait_for_finalization=False)#
Removes stake into the wallet coldkey from the specified hotkey
uid
.- Parameters:
subtensor (bittensor.core.subtensor.Subtensor) – Subtensor instance.
wallet (bittensor_wallet.Wallet) – Bittensor wallet object.
hotkey_ss58 (Optional[str]) – The
ss58
address of the hotkey to unstake from. By default, the wallet hotkey is used.netuid (Optional[int]) – Subnet unique id.
amount (Union[Balance]) – Amount to stake as Bittensor balance.
wait_for_inclusion (bool) – If set, waits for the extrinsic to enter a block before returning
True
, or returnsFalse
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 returnsFalse
if the extrinsic fails to be finalized within the timeout.
- Returns:
- Flag is
True
if extrinsic was finalized or included in the block. If we did not wait for finalization / inclusion, the response is
True
.
- Flag is
- Return type:
success (bool)
- bittensor.core.extrinsics.unstaking.unstake_multiple_extrinsic(subtensor, wallet, hotkey_ss58s, netuids, amounts=None, wait_for_inclusion=True, wait_for_finalization=False)#
Removes stake from each
hotkey_ss58
in the list, using each amount, to a common coldkey.- Parameters:
subtensor (bittensor.core.subtensor.Subtensor) – Subtensor instance.
wallet (bittensor_wallet.Wallet) – The wallet with the coldkey to unstake to.
hotkey_ss58s (List[str]) – List of hotkeys to unstake from.
netuids (List[int]) – List of subnets unique IDs to unstake from.
amounts (List[Balance]) – List of amounts to unstake. If
None
, unstake all.wait_for_inclusion (bool) – If set, waits for the extrinsic to enter a block before returning
True
, or returnsFalse
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 returnsFalse
if the extrinsic fails to be finalized within the timeout.
- Returns:
- Flag is
True
if extrinsic was finalized or included in the block. Flag isTrue
if any wallet was unstaked. If we did not wait for finalization / inclusion, the response is
True
.
- Flag is
- Return type:
success (bool)