bittensor.extrinsics.delegation#
Module Contents#
Functions#
| 
 | Delegates the specified amount of stake to the passed delegate. | 
| 
 | Becomes a delegate for the hotkey. | 
| 
 | Un-delegates stake from the passed delegate. | 
Attributes#
- bittensor.extrinsics.delegation.delegate_extrinsic(subtensor, wallet, delegate_ss58=None, amount=None, wait_for_inclusion=True, wait_for_finalization=False, prompt=False)#
- Delegates the specified amount of stake to the passed delegate. - Parameters:
- wallet (bittensor.wallet) – Bittensor wallet object. 
- delegate_ss58 (Optional[str]) – The - ss58address of the delegate.
- amount (Union[Balance, float]) – Amount to stake as bittensor balance, or - floatinterpreted as Tao.
- wait_for_inclusion (bool) – If set, waits for the extrinsic to enter a block before returning - true, or returns- falseif 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 returns- falseif 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 - trueif extrinsic was finalized or uncluded in the block. If we did not wait for finalization / inclusion, the response is- true.
- 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.logger#
- bittensor.extrinsics.delegation.nominate_extrinsic(subtensor, wallet, wait_for_finalization=False, wait_for_inclusion=True)#
- Becomes a delegate for the hotkey. 
- bittensor.extrinsics.delegation.undelegate_extrinsic(subtensor, wallet, delegate_ss58=None, amount=None, wait_for_inclusion=True, wait_for_finalization=False, prompt=False)#
- Un-delegates stake from the passed delegate. - Parameters:
- wallet (bittensor.wallet) – Bittensor wallet object. 
- delegate_ss58 (Optional[str]) – The - ss58address of the delegate.
- amount (Union[Balance, float]) – Amount to unstake as bittensor balance, or - floatinterpreted as Tao.
- wait_for_inclusion (bool) – If set, waits for the extrinsic to enter a block before returning - true, or returns- falseif 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 returns- falseif 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 - trueif extrinsic was finalized or uncluded in the block. If we did not wait for finalization / inclusion, the response is- true.
- 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.