bittensor.extrinsics.delegation#
Attributes#
Functions#
|
Becomes a delegate for the hotkey. |
|
Delegates the specified amount of stake to the passed delegate. |
|
Un-delegates stake from the passed delegate. |
|
Decrease delegate take for the hotkey. |
|
Increase delegate take for the hotkey. |
Module Contents#
- bittensor.extrinsics.delegation.logger#
- bittensor.extrinsics.delegation.nominate_extrinsic(subtensor, wallet, wait_for_finalization=False, wait_for_inclusion=True)[source]#
Becomes a delegate for the hotkey.
- bittensor.extrinsics.delegation.delegate_extrinsic(subtensor, wallet, delegate_ss58=None, amount=None, wait_for_inclusion=True, wait_for_finalization=False, prompt=False)[source]#
Delegates the specified amount of stake to the passed delegate.
- Parameters:
wallet (bittensor.wallet) – Bittensor wallet object.
delegate_ss58 (Optional[str]) – The
ss58
address of the delegate.amount (Union[Balance, float]) – Amount to stake as bittensor balance, or
float
interpreted as Tao.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.prompt (bool) – If
true
, the call waits for confirmation from the user before proceeding.subtensor (bittensor.subtensor)
- Returns:
Flag is
true
if extrinsic was finalized or uncluded in the block. If we did not wait for finalization / inclusion, the response istrue
.- Return type:
success (bool)
- Raises:
NotRegisteredError – If the wallet is not registered on the chain.
NotDelegateError – If the hotkey is not a delegate on the chain.
- bittensor.extrinsics.delegation.undelegate_extrinsic(subtensor, wallet, delegate_ss58=None, amount=None, wait_for_inclusion=True, wait_for_finalization=False, prompt=False)[source]#
Un-delegates stake from the passed delegate.
- Parameters:
wallet (bittensor.wallet) – Bittensor wallet object.
delegate_ss58 (Optional[str]) – The
ss58
address of the delegate.amount (Union[Balance, float]) – Amount to unstake as bittensor balance, or
float
interpreted as Tao.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.prompt (bool) – If
true
, the call waits for confirmation from the user before proceeding.subtensor (bittensor.subtensor)
- Returns:
Flag is
true
if extrinsic was finalized or uncluded in the block. If we did not wait for finalization / inclusion, the response istrue
.- Return type:
success (bool)
- Raises:
NotRegisteredError – If the wallet is not registered on the chain.
NotDelegateError – If the hotkey is not a delegate on the chain.
- bittensor.extrinsics.delegation.decrease_take_extrinsic(subtensor, wallet, hotkey_ss58=None, take=0, wait_for_finalization=False, wait_for_inclusion=True)[source]#
Decrease delegate take for the hotkey.
- Parameters:
- Returns:
True
if the transaction was successful.- Return type:
success (bool)