bittensor.core.extrinsics.pallets.commitments

bittensor.core.extrinsics.pallets.commitments#

Classes#

Commitments

Factory class for creating GenericCall objects for Commitments pallet functions.

Module Contents#

class bittensor.core.extrinsics.pallets.commitments.Commitments#

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

Factory class for creating GenericCall objects for Commitments pallet functions.

This class provides methods to create GenericCall instances for Commitments 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 = Commitments(subtensor).set_commitment(netuid=14, …) response = subtensor.sign_and_send_extrinsic(call=call, …)

# Async usage call = await Commitments(async_subtensor).set_commitment(netuid=14, …) response = await async_subtensor.sign_and_send_extrinsic(call=call, …)

set_commitment(netuid, info)#

Returns GenericCall instance for Subtensor function Commitments.set_commitment.

Parameters:
  • netuid (int) – The netuid of the subnet to set commitment for.

  • info (dict) – Dictionary of info fields to set.

Returns:

GenericCall instance.

Return type:

bittensor.core.extrinsics.pallets.base.Call