bittensor.core.extrinsics.pallets.balances#

Classes#

Balances

Factory class for creating GenericCall objects for Balances pallet functions.

Module Contents#

class bittensor.core.extrinsics.pallets.balances.Balances#

Bases: bittensor.core.extrinsics.pallets.base.CallBuilder

Factory class for creating GenericCall objects for Balances pallet functions.

This class provides methods to create GenericCall instances for all Balances pallet extrinsics.

Works with both sync (Subtensor) and async (AsyncSubtensor) instances. For async operations, pass an AsyncSubtensor instance and await the result.

Example

# Sync usage call = Balances(subtensor).transfer_all(dest=”5DE..”, keep_alive=True) response = subtensor.sign_and_send_extrinsic(call=call, …)

# Async usage call = await Balances(subtensor).transfer_all(dest=”5DE..”, keep_alive=True) response = await async_subtensor.sign_and_send_extrinsic(call=call, …)

transfer_all(dest, keep_alive)#

Returns GenericCall instance for Subtensor function Balances.transfer_all.

Parameters:
  • dest (str) – The destination ss58 address.

  • keep_alive (bool) – A boolean to determine if the transfer_all operation should send all of the funds the account has, causing the sender account to be killed (false), or transfer everything except at least the existential deposit, which will guarantee to keep the sender account alive (true).

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call

transfer_allow_death(dest, value)#

Returns GenericCall instance for Subtensor function Balances.transfer_allow_death.

Parameters:
  • dest (str) – The destination ss58 address.

  • value (int) – The Balance amount in RAO to transfer.

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call

transfer_keep_alive(dest, value)#

Returns GenericCall instance for Subtensor function Balances.transfer_keep_alive.

Parameters:
  • dest (str) – The destination ss58 address.

  • value (int) – The Balance amount in RAO to transfer.

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call