Skip to main content

Module codec

Module codec 

Source
Expand description

SCALE encode/decode against a crate::runtime::Runtime.

The decoded-value shapes are cyscale’s, pinned by the shape corpus; the encoder accepts the same lenient inputs the SDK has always fed the codec (ss58 strings for account ids, 0x-hex for byte arrays, {"Variant": ...} dicts for enums, None for Option).

Re-exports§

pub use value::Value;

Modules§

batch
Bulk decode entry points — the read-heavy hot loops behind query_map pages and runtime-API batches.
decode
SCALE decode into cyscale’s value shapes (see value.rs).
encode
SCALE encode with the seam’s lenient input coercions: ss58 strings or 0x-hex for account ids, hex/str/bytes for byte carriers, bare variant names or {"Variant": payload} dicts for enums, None for Option-None, ints for compacts. Byte-equality with the previous codec is pinned by the golden call/payload/extrinsic vectors.
extrinsic
Signature payloads, signed-extrinsic assembly and decode, era birth, and multisig account derivation — the transaction-shaped primitives on top of the codec, all pinned by the golden vectors.
storage
Storage key construction and map-key recovery.
value
The decoded-value model: the exact shapes cyscale rendered SCALE data as, which the SDK’s reads/intents layer pattern-matches on. The shape corpus (sdk/python/tests/fixtures/shape_corpus) is the contract; this enum is its Rust carrier, materialized 1:1 into Python objects by the binding crate.