sologger-idl-decoder
Decodes what Anchor programs emit — Program data: events and custom program error
codes — into structured form, driven purely by the program's IDL JSON.
- Supports both the legacy (pre-0.30) and the 0.30+ Anchor IDL spec, including the
differing discriminator layouts (explicit
discriminatorarrays vssha256("event:<Name>")[..8]). - Parses the IDL with serde instead of depending on
anchor-lang, keeping the dependency tree small and WASM-friendly. - Enriches
LogContextrecords fromsologger-log-contextin place:data_logsbecomedecoded_events, anderror_coderesolves toerror_namevia the IDL'serrorsarray.
let mut registry = new;
registry.insert_json?;
// log_contexts from LogContext::parse_logs / the transformer crates
registry.enrich_all;
Used by the sologger binary (via the idls map in sologger-config.json) and by
sologger-log-transformer-wasm for the browser UI.