Expand description
§Manifest-driven instruction builder
Turns a ProgramManifest + named instruction + typed args into a raw
instruction shape (program_id, data, accounts) ready to be handed to any
Solana client crate (solana-sdk, magic-block, anchor-client, etc.) for
transaction assembly.
The entire point: the on-chain program’s manifest IS the off-chain IDL. There is no “regenerate the TypeScript types after you redeploy” step, because the source of truth is compiled into the program.
§Design notes
- Single source of truth: no separate
.jsonIDL file that drifts. - Layout-id-verified account lookups: if a caller supplies an account
for a slot whose
layout_refnames a layout in the manifest, the builder can validate on construction that the passed-in account bytes match the expected fingerprint. - Zero serde: args are written to a byte vec using the
ArgDescriptorsize declarations in the manifest.
Structs§
- Account
Meta - A Solana-compatible account meta. Re-defined locally so this crate does
not pull in
solana-programorsolana-sdk. Consumers downshift to their preferred SDK’sAccountMetaafter construction. - Built
Instruction - One built instruction ready for submission.
- Instruction
Builder - Fluent builder over a manifest + one instruction.
Enums§
- Build
Error - Builder error surface.