OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Anchores

Anchores is an MIT-licensed TypeScript library for parsing Solana transactions and decoding instructions, events and structs with parsers defined in code.

Independent OpenViST project profile, based on linked sources.

Anchores — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Anchores when a TypeScript application needs code-defined parsers for Solana transaction instructions, events or structs, including the documented Jupiter swap-event case.

Who it is for

  • TypeScript developers building tools that inspect Solana transaction data.
  • Developers who need to parse program-specific instructions or events.
  • Developers working with Jupiter swap events.

Documented uses

  • Extract supported instructions or events from a Solana transaction.
  • Decode Jupiter swap-event data into structured fields.
  • Define custom parsers for program-specific data.
Before you choose

Requirements & limits

The public GitHub repository identifies the project as MIT-licensed.

  • Structs are defined in code; the README says the library does not use an IDL.
  • The README describes ESM and CommonJS support, TypeScript-friendly usage and minimal dependencies.
  • The README reports a tree-shaken gzip size of 4.08 kB for parsing Jupiter swap events.
  • The project is described as a work in progress; not all Borsh types are supported and the API may change.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up Jupiter swap-event parsing

Add the documented Anchores parser call for extracting Jupiter V6 swap events from a parsed transaction.

Before you start

  • A TypeScript project with the Anchores package installed using npm.
  • A transaction value obtained with the documented connection.getParsedTransaction call.

Steps

  1. Install the package with the command below.

    Documented command
    npm i anchores
  2. Import parseTransaction from anchores and JUPITER_V6_PROGRAM_ID and SwapEvent from anchores/parsers/jupiter.

  3. Pass the Jupiter program ID, an events parser list containing SwapEvent, and the transaction to parseTransaction.

Expected outcome

The documented function call returns parsed events for the supplied transaction.

Guide limitations

  • The README warns that support for all Borsh types is incomplete and the API may change.
Source-based practical guide

Define a custom event parser

Create a parser for program-specific event data and make it available to Anchores decoding functions.

Before you start

  • A TypeScript project with Anchores installed.
  • Event data supplied as a Uint8Array.

Steps

  1. Import the binary utilities from anchores/binary and create a reader from the event data.

  2. Read the required fields with the documented binary helpers, as in the example using public keys and u64 values.

  3. Use the parser directly or place it in a parser object for parseTransaction, decodeEvents, or decodeStructs.

Expected outcome

A custom parser returns a structured value from the event data and can be passed to the documented decoding functions.

Guide limitations

  • Support for all Borsh types is incomplete, and the API may change.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 October 2026
Original website title
ryoid/anchores · Official homepage title · retained in its source language