jiminy-schema
Layout Manifest v1 for Jiminy account schemas. Structured descriptions of account layouts for cross-language tooling, TypeScript decoder generation, indexer integration, and schema validation.
#![no_std] compatible (std/codegen/indexer features gated)
[]
= "0.16"
Why This Matters
Jiminy's account ABI is deterministic: every zero_copy_layout! struct has
a layout_id, field offsets, and canonical types defined at compile time.
jiminy-schema is the bridge that carries that information out of Rust and
into the rest of your stack. Without it, off-chain code has to guess at
account structure.
How This Connects
zero_copy_layout! LayoutManifest export_json()
Rust struct ──▶ structured description ──▶ JSON manifest
│
┌─────────┼──────────┐
▼ ▼ ▼
TypeScript Indexer Explorer
decoders matching display
zero_copy_layout!defines your account struct and computesLAYOUT_ID.- You build a
LayoutManifestdescribing the same struct (name, fields, types, sizes). export_json()emits a JSON manifest. No serde dependency.@jiminy/ts, indexers, and explorers consume the manifest to decode accounts.
What's in here
LayoutManifest |
Describes one account type: name, version, discriminator, layout_id, field list |
FieldDescriptor |
Per-field metadata: name, canonical type, size |
CanonicalType |
Language-independent type identifiers (U8, U64, Pubkey, Header, etc.) |
codegen |
TypeScript decoder generation (feature: codegen) |
indexer |
Account matching and decoding for off-chain indexers (feature: std) |
Example
use *;
let manifest = LayoutManifest ;
assert_eq!;
assert_eq!;
New in 0.16
verify_account()now enforces exact size matching.- Documentation updates for cross-language tooling.
New in 0.15
export_json(): JSON manifest output for TypeScript decoders and indexers. No serde dependency.verify(): structural validation (header check, zero-size detection, duplicate field names).anchor_idl_json(): Anchor IDL v0.1.0 account fragment generation for explorer/wallet integration.
About
Built by MoonManQuark / Bluefoot Labs.
Donations: solanadevdao.sol (F42ZovBoRJZU4av5MiESVwJWnEx8ZQVFkc1RM29zMxNT)
License
Apache-2.0