Expand description
Atom-buffer + merkle-tree snapshot types for ledger reads.
The async ledger field readers (read_counter_atoms,
read_cell_atoms, read_map_atoms, read_set_atoms,
read_list_atoms, read_merkle_tree_atoms,
read_historic_merkle_tree_atoms) live in
[moonproof_contracts::ledger_readers] — they require a
PublicDataProvider which would pull a heavy network dep into
this wasm-friendly crate.
Each AtomBuffer is the language-agnostic surface produced by
storage-shape readers; the descriptor walker in
crate::ir::descriptor turns it into a typed
moonproof_runtime_ir::RuntimeValue.
Structs§
- Atom
Buffer - Raw atom buffer — sequence of
moonproof_ledger::base_crypto::fab::ValueAtomvalues. WrapsVec<ValueAtom>directly so downstream walkers can pass&buf.atomsstraight intocrate::ir::descriptor::decode_aligned_valuewithout reconstructing a secondVec<ValueAtom>per read. - Historic
Merkle Tree Snapshot - Snapshot of a
HistoricMerkleTree<depth, T>storage field — the live tree plus a bounded history window of prior roots. - Merkle
Tree Snapshot - Snapshot of a
MerkleTree<depth, T>storage field — the live root + height. Mirrors the midnight-jsMerkleTreeview surface.
Functions§
- cell_
atoms - Decode a
Cell<T>-storage cell into itsAtomBuffer. - counter_
atoms - Decode a
Counter-storage cell into itsAtomBuffer. - field_
at - Pull the cell at
indexfrom the contract’s root state array. - historic_
merkle_ tree_ snapshot - Decode a
HistoricMerkleTree<depth, T>-storage cell into its snapshot. - list_
entries - Decode a
List<T>-storage cell into one entry per slot. - map_
entries - Decode a
Map<K, V>-storage cell into one entry per stored key. - merkle_
tree_ snapshot - Decode a
MerkleTree<depth, T>-storage cell into its snapshot. - project_
atoms_ as_ json - Project atoms through the descriptor-aware decoder for display
purposes only (CLI
contract read --json, REPLc.ledger.<field>()). - set_
entries - Decode a
Set<T>-storage cell into one entry per element.