bittensor.core.extrinsics.pallets.mev_shield#
Classes#
Factory class for creating GenericCall objects for MevShield pallet functions. |
Module Contents#
- class bittensor.core.extrinsics.pallets.mev_shield.MevShield#
Bases:
bittensor.core.extrinsics.pallets.base.CallBuilderFactory class for creating GenericCall objects for MevShield pallet functions.
This class provides methods to create GenericCall instances for all MevShield 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 = MevShield(subtensor).submit_encrypted(
commitment=”0x1234…”, ciphertext=b”encrypted_data…”
) response = subtensor.sign_and_send_extrinsic(call=call, …)
# Async usage call = await MevShield(async_subtensor).submit_encrypted(
commitment=”0x1234…”, ciphertext=b”encrypted_data…”
) response = await async_subtensor.sign_and_send_extrinsic(call=call, …)
- submit_encrypted(commitment, ciphertext)#
Returns GenericCall instance for MevShield function submit_encrypted.
This function submits an encrypted extrinsic to the MEV Shield pallet. The extrinsic remains encrypted in the transaction pool until it is included in a block and decrypted by validators.
- Parameters:
- Returns:
GenericCall instance ready for extrinsic submission.
- Return type:
bittensor.core.extrinsics.pallets.base.Call
Note
The commitment is used to verify the ciphertext’s content at decryption time. The ciphertext is encrypted using ML-KEM-768 + XChaCha20Poly1305 with the public key from the NextKey storage item, which rotates every block.