Decode Anchor 0.30+ program events from Solana transaction logs, using only the IDL.
Maintained. Last release 6 months ago, commits in 2 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install solana-anchor-eventsREADME as published on PyPI with version 0.1.0.
solana-anchor-events
Decode Anchor 0.30+ program events from Solana transaction logs into plain
Python objects — using only the program's IDL, with no code generation and
no anchorpy.
Solana programs built with Anchor emit events into a transaction's log output as opaque, base64-encoded Borsh blobs prefixed by an 8-byte discriminator:
Program data: vdt/007mYe69238...
Normally you need that specific program's generated client to read them. This package instead parses the program's IDL (the JSON schema Anchor produces) at runtime and walks its type tree to decode any event it describes. It is generic for any Anchor 0.30+ program.
The decoder is implemented in Rust (via PyO3) for speed and
correctness, and ships as a single abi3 wheel that works on any CPython ≥ 3.9.
AI disclaimer
This software was written by AI. The implementation, tests, and this documentation were generated by an AI coding assistant. It has an automated test suite (a full Rust ↔ Python event round-trip plus Rust unit tests) and has been run against a real pump.fun IDL, but it has not been independently audited by a human. Review it yourself before relying on it in production, and treat decoded values as untrusted until you've validated them against your own expectations.
Installation
pip install solana-anchor-events
The import name uses underscores:
import solana_anchor_events.
Building from source
Requires a Rust toolchain and maturin:
pip install maturin
maturin build --release # wheel under target/wheels/
# or, for local development:
maturin develop
Usage
Give the decoder the IDL JSON once, then feed it the program log lines from any
transaction. You get back a list of (event_name, data) tuples, where data
is a dict of the event's fields.