Expand description
Instruction decoder library for Light Protocol.
This crate provides:
- Core types for instruction decoding (DecodedField, DecodedInstruction, InstructionDecoder trait)
- Decoder registry for managing multiple program decoders
- Built-in decoders for Light Protocol programs (System, Compressed Token, etc.)
- Transaction logging configuration and formatting utilities
The crate is designed to be independent of LiteSVM/test infrastructure, enabling use in both test environments and standalone tools.
Note: Most functionality is only available off-chain (not on Solana targets).
Re-exports§
pub use config::EnhancedLoggingConfig;pub use config::LogVerbosity;pub use formatter::Colors;pub use formatter::TransactionFormatter;pub use programs::AccountCompressionInstructionDecoder;pub use programs::CTokenInstructionDecoder;pub use programs::LightSystemInstructionDecoder;pub use programs::RegistryInstructionDecoder;pub use programs::ComputeBudgetInstructionDecoder;pub use programs::SplTokenInstructionDecoder;pub use programs::SystemInstructionDecoder;pub use programs::Token2022InstructionDecoder;pub use registry::DecoderRegistry;pub use types::AccountAccess;pub use types::AccountChange;pub use types::AccountStateSnapshot;pub use types::CompressedAccountInfo;pub use types::EnhancedInstructionLog;pub use types::EnhancedTransactionLog;pub use types::LightProtocolEvent;pub use types::MerkleTreeChange;pub use types::TransactionStatus;pub use solana_instruction;pub use solana_pubkey;pub use solana_signature;
Modules§
- config
- Configuration types for enhanced logging
- formatter
- Transaction formatting utilities for explorer-style output
- programs
- Native Solana program decoders using macro-derived implementations.
- registry
- Instruction decoder registry for Light Protocol and common Solana programs
- types
- Type definitions for enhanced logging
Structs§
- Decoded
Field - A decoded instruction field for display.
- Decoded
Instruction - Result of decoding an instruction.
Traits§
- Instruction
Decoder - Trait for instruction decoders - each program implements this.
Attribute Macros§
- instruction_
decoder - Attribute macro for generating InstructionDecoder from Anchor program modules.