Skip to main content

Module reader

Module reader 

Source
Expand description

§Segment-aware partial account reader

Clients usually want only a few fields of a large account, not the whole blob. Hopper’s schema knows every field’s byte offset and canonical type, so a client can pull exactly the bytes it needs and skip the rest. This is the off-chain mirror of the on-chain segment-borrow idea: read narrow, don’t deserialize what you won’t touch.

Competitive framing:

  • Quasar clients rely on Codama/Kinobi full deserialization.
  • Anchor clients rely on Borsh full deserialization.
  • Pinocchio has no client story at all.

Here the reader verifies the layout_id first, then returns raw-typed accessors for any named field, backed by the same offset tables the on-chain side uses.

Structs§

SegmentReader
Zero-copy segment-aware partial account reader.

Enums§

ReaderError
Errors produced by the segment-aware reader.