Expand description
Host-side access to note storage schemas embedded in Miden packages.
§Felt layout
The layout is structural over the resolved WIT type tree. The record
miden:base/core-types@1.0.0.felt is one felt. A u64 uses two felts in low-then-high
u32 limb order. A u32, u8, or bool uses one range-checked felt. An option<T> uses one
tag felt followed by its payload when present. A variant uses one declaration-ordinal tag felt
followed by the selected case payload. Record fields concatenate in declaration order.
Encoding and decoding use miden_field_repr::FeltReader and
miden_field_repr::FeltWriter. Codecs only parse, display, and validate values. They do not
change this layout.
Structs§
- Codec
Registry - A registry of codecs keyed by canonical WIT fully-qualified type name.
- Decoded
Value - A named value decoded from note storage.
- Error
- An error reported while reading, encoding, or decoding a note storage schema.
- Felt
- A
Feltbacked by Plonky3’s Goldilocks field element. - Felt
Layout - The minimum and maximum felt count for a schema type.
- Note
Package Artifact - A loaded package artifact and its note storage schema.
- Note
Package Resolver - Resolves package artifacts for one note macro crate.
- Note
Storage - A container for note storage items.
- Note
Storage Builder - Builds note storage from normalized dotted string paths.
- Note
Storage Schema - A resolved note storage schema with the standard codec registry.
- Schema
Case - A WIT variant case in declaration order.
- Schema
Field - A named record field in declaration order.
- Schema
Type - A resolved WIT type used by note storage.
Enums§
- Codec
Failure - Why a bundled codec did not return a value.
- Decoded
Value Kind - The structural value stored in a decoded node.
- Primitive
Type - A supported primitive WIT type.
- Schema
Type Kind - The structural kind of a resolved schema type.
- Standard
Leaf - A protocol type whose schema leaf maps directly to an existing host type and standard codec.
Constants§
- ACCOUNT_
ID_ FQN - The canonical WIT FQN for
account-id. - ASSET_
AMOUNT_ FQN - The canonical WIT FQN for
asset-amount. - FELT_
FQN - The canonical WIT FQN for
felt. - MAX_
NOTE_ CODEC_ COMPONENT_ BYTES - Default maximum bytes accepted for one note codec component before Wasmtime compilation.
- MAX_
NOTE_ STORAGE_ SCHEMA_ BYTES - Maximum bytes accepted in an embedded note storage schema section, including alignment padding.
- MAX_
NOTE_ STORAGE_ SCHEMA_ DEPTH - Maximum structural nesting depth accepted while resolving a note storage schema.
- MAX_
NOTE_ STORAGE_ SCHEMA_ FELTS - Maximum number of felts in the root note storage layout.
- MAX_
NOTE_ STORAGE_ SCHEMA_ NODES - Maximum number of nodes in the expanded note storage schema tree.
- MAX_
NOTE_ STORAGE_ SCHEMA_ TYPES - Maximum number of resolved WIT type definitions in a note storage schema.
- NOTE_
CODEC_ GUEST_ RUSTFLAGS - Rustflags the nested codec build pins, so a codec crate’s own cargo config cannot enable
simd128in the guest. Mirrors the VM event-handler plugin. - NOTE_
CODEC_ WASM_ FEATURES - Wasm proposals a note codec component may use.
- WORD_
FQN - The canonical WIT FQN for
word.
Traits§
- Consumer
Type Codec - Parses, displays, and validates one fully-qualified WIT leaf type.
Functions§
- validate_
note_ codec_ component - Applies the whole note codec component policy: the byte cap, the Wasm feature set, and the structural limits.
- validate_
note_ codec_ structure - Rejects a note codec component whose Wasm features or structure fall outside the policy.
Type Aliases§
- Result
- A result returned by note storage schema operations.