Generate Parsers with Codama
How-to generate Vixen parser with Codama
Last updated
Was this helpful?
How-to generate Vixen parser with Codama
Last updated
Was this helpful?
This guide walks you through generating a Parser using , a tool for rendering Rust SDKs and parser implementations from IDLs.
Vixen is a framework for building real-time program data pipelines in Rust. This guide helps you scaffold a parser that can be used in the Vixen runtime to decode and process Solana program data.
An idl.json
file: Either Anchor-generated or custom.
Install : Or use npm/yarn if preferred.
Initialize a JavaScript Project:
Install the required Codama packages:
Also, install dependencies for the parser generation script:
Create a Parser Generation Script
Create a new file, codama.cjs
:
Tip: The
projectName
is used for the Cargo crate name of the generated parser.
Run the Code Generation Script
Your folder structure should look like:
Build and Verify
If successful, you now have a working parser for Solana account data using Yellowstone Vixen.
Congratulations! You now have a custom Vixen parser ready for integration into a Vixen pipeline.