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.
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.
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
Add Shank to the Rust project and annotate the program as described by Shank.
From the SDK package, add Solita as a development dependency with
yarn add -D @metaplex-foundation/solita.Create
.solitarc.jsin the SDK package root withidlGenerator: 'shank'and the program, IDL, SDK, binary-install, and program directory paths.Run
yarn solitafrom 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.
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
Annotate the Rust program with Anchor attributes.
From the SDK package, add Solita as a development dependency with
yarn add -D @metaplex-foundation/solita.Create
.solitarc.jsin the SDK package root withidlGenerator: 'anchor', a program name and ID, and the program, IDL, SDK, and binary-install directory paths.Run
yarn solitafrom 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
anchorRemainingAccountsproperty on instruction account sets; the README says it can be disabled withanchorRemainingAccounts: falsewhen unused. - The README does not establish compatibility with every Anchor version or project configuration.
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

