bittensor.core.extrinsics.pallets.proxy#
Classes#
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.CallBuilderFactory 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:
- Returns:
GenericCall instance.
- Return type:
bittensor.core.extrinsics.pallets.base.Call
- announce(real, call_hash)#
Returns GenericCall instance for Subtensor function Proxy.announce.
- create_pure(proxy_type, delay, index)#
Returns GenericCall instance for Subtensor function Proxy.create_pure.
- Parameters:
- 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.
- remove_announcement(real, call_hash)#
Returns GenericCall instance for Subtensor function Proxy.remove_announcement.
- 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:
- Returns:
GenericCall instance.
- Return type:
bittensor.core.extrinsics.pallets.base.Call