bittensor.core.extrinsics.transfer#
Functions#
|
Sends a transfer extrinsic to the chain. |
|
Transfers funds from this wallet to the destination public key address. |
Module Contents#
- bittensor.core.extrinsics.transfer.do_transfer(self, wallet, dest, transfer_balance, wait_for_inclusion=True, wait_for_finalization=False)[source]#
Sends a transfer extrinsic to the chain.
- Parameters:
self (subtensor.core.subtensor.Subtensor) – The Subtensor instance object.
wallet (bittensor_wallet.Wallet) – Wallet object.
dest (str) – Destination public key address.
transfer_balance (bittensor.utils.balance.Balance) – Amount to transfer.
wait_for_inclusion (bool) – If
true
, waits for inclusion.wait_for_finalization (bool) – If
true
, waits for finalization.
- Returns:
True
if transfer was successful. block_hash (str): Block hash of the transfer. On success and if wait_for_ finalization/inclusion isTrue
. error (dict): Error message from subtensor if transfer failed.- Return type:
success (bool)
- bittensor.core.extrinsics.transfer.transfer_extrinsic(subtensor, wallet, dest, amount, wait_for_inclusion=True, wait_for_finalization=False, keep_alive=True, prompt=False)[source]#
Transfers funds from this wallet to the destination public key address.
- Parameters:
subtensor (subtensor.core.subtensor.Subtensor) – The Subtensor instance object.
wallet (bittensor_wallet.Wallet) – Bittensor wallet object to make transfer from.
dest (str, ss58_address or ed25519) – Destination public key address of receiver.
amount (Union[Balance, int]) – 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.keep_alive (bool) – If set, keeps the account alive by keeping the balance above the existential deposit.
prompt (bool) – If
true
, the call waits for confirmation from the user before proceeding.
- 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)