bittensor.core.extrinsics.pallets.proxy#

Classes#

Proxy

Factory class for creating GenericCall objects for Proxy pallet functions.

Module Contents#

class bittensor.core.extrinsics.pallets.proxy.Proxy#

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

Factory class for creating GenericCall objects for Proxy pallet functions.

This class provides methods to create GenericCall instances for all Proxy 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 = Proxy(subtensor).add_proxy(delegate=”5DE..”, proxy_type=”Any”, delay=0) response = subtensor.sign_and_send_extrinsic(call=call, …)

# Async usage call = await Proxy(async_subtensor).add_proxy(delegate=”5DE..”, proxy_type=”Any”, delay=0) response = await async_subtensor.sign_and_send_extrinsic(call=call, …)

add_proxy(delegate, proxy_type, delay)#

Returns GenericCall instance for Subtensor function Proxy.add_proxy.

Parameters:
  • delegate (str) – The SS58 address of the delegate proxy account.

  • proxy_type (str) – The type of proxy permissions (e.g., “Any”, “NonTransfer”, “Governance”, “Staking”).

  • delay (int) – The number of blocks before the proxy can be used.

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call

announce(real, call_hash)#

Returns GenericCall instance for Subtensor function Proxy.announce.

Parameters:
  • real (str) – The SS58 address of the real account on whose behalf the call will be made.

  • call_hash (str) – The hash of the call that will be executed in the future.

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call

create_pure(proxy_type, delay, index)#

Returns GenericCall instance for Subtensor function Proxy.create_pure.

Parameters:
  • proxy_type (str) – The type of proxy permissions for the pure proxy.

  • delay (int) – The number of blocks before the pure proxy can be used.

  • index (int) – The index to use for generating the pure proxy account address.

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call

kill_pure(spawner, proxy_type, index, height, ext_index)#

Returns GenericCall instance for Subtensor function Proxy.kill_pure.

Parameters:
  • spawner (str) – The SS58 address of the account that spawned the pure proxy.

  • proxy_type (str) – The type of proxy permissions.

  • index (int) – The disambiguation index originally passed to create_pure.

  • height (int) – The block height at which the pure proxy was created.

  • ext_index (int) – The extrinsic index at which the pure proxy was created.

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call

poke_deposit()#

Returns GenericCall instance for Proxy.poke_deposit.

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call

proxy(real, force_proxy_type, call)#

Returns GenericCall instance for Subtensor function Proxy.proxy.

Parameters:
  • real (str) – The SS58 address of the real account on whose behalf the call is being made.

  • force_proxy_type (Optional[str]) – The type of proxy to use for the call. If None, any proxy type can be used. Otherwise, must match one of the allowed proxy types.

  • call (scalecodec.GenericCall) – The inner call to be executed on behalf of the real account.

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call

proxy_announced(delegate, real, force_proxy_type, call)#

Returns GenericCall instance for Subtensor function Proxy.proxy_announced.

Parameters:
  • delegate (str) – The SS58 address of the delegate proxy account that made the announcement.

  • real (str) – The SS58 address of the real account on whose behalf the call will be made.

  • force_proxy_type (Optional[str]) – The type of proxy to use for the call. If None, any proxy type can be used. Otherwise, must match one of the allowed proxy types.

  • call (scalecodec.GenericCall) – The inner call to be executed on behalf of the real account (must match the announced call_hash).

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call

reject_announcement(delegate, call_hash)#

Returns GenericCall instance for Subtensor function Proxy.reject_announcement.

Parameters:
  • delegate (str) – The SS58 address of the delegate proxy account whose announcement is being rejected.

  • call_hash (str) – The hash of the call that was announced and is now being rejected.

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call

remove_announcement(real, call_hash)#

Returns GenericCall instance for Subtensor function Proxy.remove_announcement.

Parameters:
  • real (str) – The SS58 address of the real account on whose behalf the call was announced.

  • call_hash (str) – The hash of the call that was announced and is now being removed.

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call

remove_proxies()#

Returns GenericCall instance for Proxy.remove_proxies.

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call

remove_proxy(delegate, proxy_type, delay)#

Returns GenericCall instance for Subtensor function Proxy.remove_proxy.

Parameters:
  • delegate (str) – The SS58 address of the delegate proxy account to remove.

  • proxy_type (str) – The type of proxy permissions to remove.

  • delay (int) – The number of blocks before the proxy removal takes effect.

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call