OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Solita

Solita is a command-line TypeScript SDK generator that converts IDLs extracted from Solana Rust programs by Anchor or Shank into low-level client code.

Independent OpenViST project profile, based on linked sources.

Solita — 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 Solita when a Solana Rust program has an IDL generated through Anchor or Shank and you want a low-level TypeScript SDK in a client package.

Who it is for

  • Solana Rust program developers creating TypeScript SDKs for client applications.
  • Teams maintaining SDK packages that need to regenerate client code as program definitions change.
  • Developers who need configurable type aliases, IDL hooks, or custom account serializers and deserializers.

Documented uses

  • Generate a TypeScript SDK from an Anchor- or Shank-extracted Solana program IDL.
  • Regenerate client code after changing a Rust program.
  • Adjust generated type mappings or IDL content before code generation.
  • Supply custom serialization or deserialization for accounts that need it.
Before you choose

Requirements & limits

  • Solita is a CLI used from an SDK package, not a hosted SDK-generation service.
  • The documented workflow requires choosing Anchor or Shank as the IDL generator and configuring program and output paths.
  • Generated account serialization may need custom implementations for some accounts.
  • The README recommends rerunning generation after program changes.
  • The project repository specifies an Apache-2.0 license.

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

Generate an SDK with Shank

Set up the documented Shank-to-Solita workflow to generate an IDL and TypeScript SDK.

Before you start

  • A Solana Rust program and an SDK package.
  • Yarn for adding Solita as an SDK package development dependency.
  • Shank added to the Rust project with cargo add shank.
  • Rust program annotations configured for Shank.

Steps

  1. Add Shank to the Rust project and annotate the program as described by Shank.

  2. From the SDK package, add Solita as a development dependency with yarn add -D @metaplex-foundation/solita.

  3. Create .solitarc.js in the SDK package root with idlGenerator: 'shank' and the program, IDL, SDK, binary-install, and program directory paths.

  4. Run yarn solita from that folder to install the matching Shank binary and generate the IDL and SDK; add the configured .crates/ folder to .gitignore.

Expected outcome

An IDL and generated TypeScript SDK for the Rust program, with the binary install directory excluded from version control as recommended.

Guide limitations

  • The README describes setup and generation but does not guarantee that generated code will meet a particular project's requirements.
  • The recipe uses the documented Yarn and Shank workflow; it does not cover subsequent application integration.
Source-based practical guide

Generate an SDK with Anchor

Set up the documented Anchor-to-Solita workflow to generate an IDL and TypeScript SDK.

Before you start

  • A Solana Rust program annotated with Anchor attributes and an SDK package.
  • Yarn for adding Solita as an SDK package development dependency.

Steps

  1. Annotate the Rust program with Anchor attributes.

  2. From the SDK package, add Solita as a development dependency with yarn add -D @metaplex-foundation/solita.

  3. Create .solitarc.js in the SDK package root with idlGenerator: 'anchor', a program name and ID, and the program, IDL, SDK, and binary-install directory paths.

  4. Run yarn solita from that folder to install the matching Anchor binary and generate the IDL and SDK; add the configured .crates/ folder to .gitignore.

Expected outcome

An IDL and generated TypeScript SDK for the Anchor-annotated program.

Guide limitations

  • Anchor-generated IDLs include an optional anchorRemainingAccounts property on instruction account sets; the README says it can be disabled with anchorRemainingAccounts: false when unused.
  • The README does not establish compatibility with every Anchor version or project configuration.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 October 2026
Original website title
metaplex-foundation/solita · Official homepage title · retained in its source language