miden-note-schema 0.15.0

Host-side reader and codec registry for Miden note storage schemas
Documentation
//! 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.

#![deny(missing_docs)]

mod artifact;
mod builder;
mod codec;
#[cfg(feature = "codec-component")]
mod codec_component;
mod codec_structure;
mod error;
mod schema;
mod section;
mod value;

#[cfg(test)]
mod tests;

pub use artifact::{NotePackageArtifact, NotePackageResolver};
pub use builder::NoteStorageBuilder;
pub use codec::{
    ACCOUNT_ID_FQN, ASSET_AMOUNT_FQN, CodecRegistry, ConsumerTypeCodec, FELT_FQN, StandardLeaf,
    WORD_FQN,
};
#[cfg(feature = "codec-component")]
pub use codec_component::CodecLimits;
pub use codec_structure::{
    NOTE_CODEC_WASM_FEATURES, validate_note_codec_component, validate_note_codec_structure,
};
pub use error::{CodecFailure, Error, Result};
pub use miden_field::Felt;
pub use miden_protocol::note::NoteStorage;
pub use schema::{
    FeltLayout, MAX_NOTE_CODEC_COMPONENT_BYTES, MAX_NOTE_STORAGE_SCHEMA_BYTES,
    MAX_NOTE_STORAGE_SCHEMA_DEPTH, MAX_NOTE_STORAGE_SCHEMA_FELTS, MAX_NOTE_STORAGE_SCHEMA_NODES,
    MAX_NOTE_STORAGE_SCHEMA_TYPES, NOTE_CODEC_GUEST_RUSTFLAGS, NoteStorageSchema, PrimitiveType,
    SchemaCase, SchemaField, SchemaType, SchemaTypeKind,
};
pub use value::{DecodedValue, DecodedValueKind};