MevShield::Call

Variant 369 v393

pallet_shield::pallet::Call

Contains a variant per dispatchable extrinsic that this pallet has.

About This Type

Call enum for the Call pallet.

Contains all dispatchable functions (extrinsics) for the Call pallet. Each variant represents a different callable function with its parameters.

Variants (2)

IndexNameFieldsDocs
0announce_next_key
enc_key: Option
Rotate the key chain and announce the current author's ML-KEM encapsulation key. Called as an inherent every block. `enc_key` is `None` on node failure, which removes the author from future shielded tx eligibility. Key rotation order (using pre-update AuthorKeys): 1. CurrentKey ← PendingKey 2. PendingKey ← NextKey 3. NextKey ← next-next author's key (user-facing) 4. AuthorKeys[current] ← announced key
1submit_encrypted
ciphertext: BoundedVec
Users submit an encrypted wrapper. Client‑side: 1. Read `NextKey` (ML‑KEM encapsulation key bytes) from storage. 2. Sign your extrinsic so that it can be executed when added to the pool, i.e. you may need to increment the nonce if you submit using the same account. 3. Encrypt: plaintext = signed_extrinsic key_hash = xxhash128(NextKey) kem_len = Length of kem_ct in bytes (u16) kem_ct = Ciphertext from ML‑KEM‑768 nonce = Random 24 bytes used for XChaCha20‑Poly1305 aead_ct = Ciphertext from XChaCha20‑Poly1305 with ML‑KEM‑768 + XChaCha20‑Poly1305, producing ciphertext = key_hash || kem_len || kem_ct || nonce || aead_ct

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 2 possible variants.
Size
variable (1+ bytes)

Examples

announce_next_key = announce_next_key(enc_key)
0x00<field0>
00 Variant index 0 = announce_next_key
field 0 enc_key: Option
submit_encrypted = submit_encrypted(ciphertext)
0x01<field0>
01 Variant index 1 = submit_encrypted
field 0 ciphertext: BoundedVec

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode MevShield::Call — variant "announce_next_key"
const value = registry.createType("MevShield::Call", { announce_next_key: { enc_key: 0 } });
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
369
Kind
Variant
Path
pallet_shield::pallet::Call
Runtime
v393