> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Solana tooling

> Modern Solana development tooling for Chainstack nodes — Solana CLI, @solana/kit, Anchor 1.0, LiteSVM, Surfpool, solana-py, and more.

> [!NOTE]
>
> Chainstack plans to deprecate Trader Nodes on December 1, 2026. We recommend moving your workloads to [Global Nodes](https://docs.chainstack.com/docs/global-elastic-node.md) before then. See [Migrate from Trader Nodes](https://docs.chainstack.com/docs/migrate-from-trader-nodes.md).

Get started with a [reliable Solana RPC endpoint](https://chainstack.com/build-better-with-solana/), then plug it into the tools below.

## Solana CLI (Agave)

The Solana Foundation one-liner installs the full toolkit — Agave CLI, Anchor, and Surfpool — in a single step.

```bash theme={"system"}
curl --proto '=https' --tlsv1.2 -sSfL https://solana-install.solana.workers.dev | bash
```

Alternatively, install just the Agave CLI:

```bash theme={"system"}
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
```

> [!NOTE]
>
> The client is called **Agave** (forked from Solana Labs by Anza), but the binary is still named `solana` for ecosystem compatibility. `solana --version` prints `solana-cli 3.x.x (... client:Agave)`. Upgrades now go through `agave-install update` (the old `solana-install` binary was renamed).

Point the CLI at your Chainstack node:

```bash theme={"system"}
solana config set --url YOUR_CHAINSTACK_ENDPOINT
```

> [!NOTE]
>
> This is only needed on **Trader Nodes**, whose WebSocket endpoint is on a different host than the HTTPS one — the WSS host carries a `ws-` prefix (`nd-….p2pify.com` for HTTPS, `ws-nd-….p2pify.com` for WSS). Because `solana config set` derives the WebSocket URL by swapping only the protocol, set it explicitly on a [Trader Node](https://docs.chainstack.com/docs/trader-node.md):
>
> ```bash theme={"system"}
> solana config set --ws YOUR_CHAINSTACK_WSS_ENDPOINT
> ```
>
> On **Global Nodes**, HTTPS and WebSocket share the same host (for example, `solana-mainnet.core.chainstack.com`), so the derived WebSocket URL is correct and no `--ws` flag is needed.

Example:

```bash theme={"system"}
$ solana block-height
413787151
```

Full command reference: [Solana CLI docs](https://docs.anza.xyz/cli).

## QUIC support

`sendTransaction` on a Chainstack Solana node forwards over QUIC to the current and next leaders. No client configuration required.

For high landing rate under contention, use [Solana Trader Nodes](https://docs.chainstack.com/docs/solana-trader-nodes.md) — `sendTransaction` is routed through bloXroute's staked [Trader API](https://docs.bloxroute.com/solana/trader-api-v2), all other RPC calls stay on the standard endpoint. See also the [Stake-Weighted QoS guide](https://solana.com/developers/guides/advanced/stake-weighted-qos).

## JSON-RPC API

Any HTTP client works. Use [curl](https://curl.haxx.se) or [Postman](https://www.getpostman.com) for ad-hoc calls; see the full [JSON-RPC reference](https://solana.com/docs/rpc) for all methods.

```bash theme={"system"}
curl -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"getBalance","params":["23dQfKhhsZ9RA5AAn12KGk21MB784PmTB3gfKRwdBNHr"],"id":1}' \
  YOUR_CHAINSTACK_ENDPOINT
```

where `YOUR_CHAINSTACK_ENDPOINT` is your node HTTPS endpoint. See [node access details](https://docs.chainstack.com/docs/manage-your-node.md#view-node-access-and-credentials).

## gRPC: Yellowstone Geyser

Real-time streaming runs over gRPC through the [Yellowstone gRPC Geyser plugin](https://docs.chainstack.com/docs/yellowstone-grpc-geyser-plugin.md), a paid add-on you install on the node. Its endpoint appears under **Yellowstone gRPC** in the node's **Access and credentials** view, separate from the HTTPS and WSS endpoints. The endpoint listens on port `443` with TLS and authenticates with the token in the `x-token` metadata header rather than in the URL. The console shows it as `https://yellowstone-solana-mainnet.core.chainstack.com:443` on Global Nodes and as a bare hostname with no scheme or port on Dedicated Nodes.

The endpoint form depends on the client: `@triton-one/yellowstone-grpc` (TypeScript) and `yellowstone-grpc-client` (Rust) need the scheme and port, as in `https://HOST:443`, while the Python `grpc` package, Go, and `grpcurl` take `HOST:443` with no scheme. `HOST` is the hostname alone — `yellowstone-solana-mainnet.core.chainstack.com` on Global Nodes. See [Connect to your endpoint](https://docs.chainstack.com/docs/yellowstone-grpc-geyser-plugin.md#connect-to-your-endpoint) for per-client examples, and [gRPC access via x-token](https://docs.chainstack.com/docs/authentication-methods-for-different-scenarios.md#grpc-access-via-x-token) for the authentication details.

## JavaScript and TypeScript: @solana/kit

[`@solana/kit`](https://github.com/anza-xyz/kit) is the modern Solana JavaScript SDK — a tree-shakeable, functional API. It is the direct successor to what briefly shipped as `@solana/web3.js@2.x`, and `@solana/web3.js` v3 is built on it.

```bash theme={"system"}
npm install @solana/kit
```

Fetch an account balance against your Chainstack endpoint:

```typescript theme={"system"}
import { address, createSolanaRpc, lamports } from "@solana/kit";

const rpc = createSolanaRpc("YOUR_CHAINSTACK_ENDPOINT");
const balance = await rpc
  .getBalance(address("23dQfKhhsZ9RA5AAn12KGk21MB784PmTB3gfKRwdBNHr"))
  .send();

console.log(balance.value); // lamports as bigint
```

### Per-program instruction builders

Kit exposes only the RPC layer. Typed instruction builders for each Solana program live in per-program packages under the [`solana-program`](https://github.com/solana-program) org — install them alongside Kit as you need them:

```bash theme={"system"}
npm install @solana/kit @solana-program/system @solana-program/token
```

## JavaScript and TypeScript: @solana/web3.js v3

`npm install @solana/web3.js` installs v3, which keeps the class-based `Connection`, `PublicKey`, and `Transaction` API and rebuilds it on Kit. v3 needs Node.js 20.18 or later. With Yarn 1, install it on Node.js 24 or later, or add `--ignore-engines`: its `@solana-program/stake` dependency declares Node.js 24, and Yarn 1 enforces that. Its `Connection` also works as a Kit client, so you can pass it to Kit-based program clients such as `@solana-program/token`.

```typescript theme={"system"}
import { Connection, PublicKey } from "@solana/web3.js";

const connection = new Connection("YOUR_CHAINSTACK_ENDPOINT", "confirmed");
const balance = await connection.getBalance(
  new PublicKey("23dQfKhhsZ9RA5AAn12KGk21MB784PmTB3gfKRwdBNHr")
);

console.log(balance); // lamports as bigint
```

### Upgrading from @solana/web3.js v1

v1 is on a [maintenance branch](https://github.com/solana-foundation/solana-web3.js/tree/maintenance/v1.x) that receives critical fixes only, including protocol compatibility updates such as [transaction v1](https://docs.chainstack.com/docs/solana-transaction-v1.md) read support in 1.99.0. Code written for v1 needs these changes on v3:

* `await` the calls that are now async: `Keypair.generate()`, `Keypair.fromSecretKey()`, `Keypair.fromSeed()`, `transaction.sign()`, and `transaction.serialize()` on a legacy `Transaction`.
* Replace `PublicKey.findProgramAddressSync()` with `await PublicKey.findProgramAddress()`, and `toBuffer()` with `toBytes()`.
* Treat lamports, slots, block heights, and fees as `bigint`.
* Read account data as a `Uint8Array` instead of a `Buffer`.
* Set the commitment explicitly where it matters, because v3 requests `confirmed` by default.

`@solana/spl-token`, Anchor, and `@solana/wallet-adapter-react` require web3.js v1. With them, install `@solana/web3.js@1`, or replace `@solana/spl-token` with `@solana-program/token` on v3. For the full upgrade steps, see the official [v1 to v3 migration guide](https://github.com/solana-foundation/solana-web3.js/blob/main/docs/web3js-v1-to-v3-migration.md) and [Common errors with @solana/web3.js](https://docs.chainstack.com/docs/common-errors-with-solana-web3js.md).

## React dApps: create-solana-dapp

The official scaffolding CLI bootstraps a full dApp (Next.js + Tailwind + wallet connection + Anchor example) in one command:

```bash theme={"system"}
npm create solana-dapp@latest
# or: pnpm create solana-dapp@latest
# or: bun create solana-dapp@latest
```

Templates are maintained at [solana-foundation/templates](https://github.com/solana-foundation/templates). The default scaffold uses `@solana/kit` + [`@solana/react-hooks`](https://github.com/solana-foundation/framework-kit) (framework-kit) for wallet and RPC wiring.

## Programs: Anchor 1.0

[Anchor v1.0.0](https://www.anchor-lang.com) shipped on 2026-04-02. Install via the Anchor Version Manager:

```bash theme={"system"}
cargo install --git https://github.com/solana-foundation/anchor avm --force
avm install latest
avm use latest
```

> [!WARNING]
>
> **Breaking rename in v1.0:** The TypeScript package was renamed from `@coral-xyz/anchor` to `@anchor-lang/core`. The Rust crate remains `anchor-lang`. Existing `@coral-xyz/anchor` imports continue to resolve to the 0.32.x line but will not receive v1.0 features.

Anchor v1.0 also makes [Surfpool the default validator](https://github.com/solana-foundation/anchor/pull/4106) for `anchor test` and `anchor localnet`. See [Solana: Anchor development](https://docs.chainstack.com/docs/solana-anchor-development.md) for an end-to-end walkthrough.

## Client codegen: Codama

[Codama](https://github.com/codama-idl/codama) (the successor to Kinobi) generates typed JavaScript and Rust clients from a program IDL. The standard workflow is:

```
Anchor / Shank macros → IDL → Codama → TypeScript / Rust clients
```

```bash theme={"system"}
pnpm install codama
codama init
```

This is how the `@solana-program/*` packages are produced. Any program you ship should emit an IDL and pipe it through Codama to generate first-class client types.

## Local testing

Three tools cover the modern Solana testing pyramid:

| Tier | Tool | Guide |
| - | - | - |
| Unit (in-process, multi-instruction) | **LiteSVM** | [Solana: Fast unit testing with LiteSVM](https://docs.chainstack.com/docs/solana-litesvm-testing.md) |
| Unit (single-instruction, CU benchmarks) | [Mollusk](https://github.com/anza-xyz/mollusk) | — |
| Integration (full RPC, mainnet fork) | **Surfpool** | [Solana: Surfpool quick-start](https://docs.chainstack.com/docs/solana-surfpool.md) |

LiteSVM boots an in-process SVM for fast unit tests. Surfpool wraps LiteSVM with a full JSON-RPC server and a copy-on-read mainnet fork — Anchor 1.0 invokes it as the default validator. Mollusk, from Anza, focuses on single-instruction CU profiling.

## Python: Solana.py and solders

[Solana.py](https://github.com/michaelhly/solana-py) is the main RPC client. Use `AsyncClient`; version 0.40.0 removed the synchronous `Client`.

```bash theme={"system"}
pip install solana
```

```python theme={"system"}
import asyncio
from solana.rpc.async_api import AsyncClient
from solders.pubkey import Pubkey

async def main():
    async with AsyncClient("YOUR_CHAINSTACK_ENDPOINT") as client:
        print(await client.get_balance(Pubkey.from_string("23dQfKhhsZ9RA5AAn12KGk21MB784PmTB3gfKRwdBNHr")))

asyncio.run(main())
```

> [!NOTE]
>
> Solana.py now uses [solders](https://github.com/kevinheavey/solders) under the hood for its core types (`Keypair`, `Transaction`, `Pubkey`, etc.) — `pip install solana` installs solders transitively. Solders also ships the Python bindings for LiteSVM (`from solders.litesvm import LiteSVM`).

## AI-assisted development

The Solana Foundation publishes an official [solana-dev-skill](https://github.com/solana-foundation/solana-dev-skill) — a Claude Code skill that teaches agents the current Solana stack (Kit, Anchor 1.0, Codama, LiteSVM/Surfpool, security patterns, version compatibility).

Install it into Claude Code:

```bash theme={"system"}
npx skills add https://github.com/solana-foundation/solana-dev-skill
```

Once installed, the skill activates automatically on Solana-related prompts. It covers program development (Anchor and Pinocchio), client work with Kit and framework-kit, testing with LiteSVM and Surfpool, IDL codegen with Codama, and common error troubleshooting.

For the broader AI tooling ecosystem — Cursor rules, MCP servers, agent kits — see the Solana Foundation's [awesome-solana-ai](https://github.com/solana-foundation/awesome-solana-ai) catalog.

## Wallets

### Backpack

[Backpack](https://backpack.app) is one of the few Solana wallets that lets you set a custom RPC endpoint — essential if you want your wallet to inherit the reliability of your own node rather than share a public endpoint during congestion.

To point Backpack at your Chainstack Solana node:

1. Open Backpack.
2. Click the account icon > **Settings**.
3. Click **Solana** > **RPC connection** > **Custom**.
4. Enter your Chainstack Solana HTTPS endpoint and click **Update**.

## Reference repos

These are the source repositories we worked against while writing this guide. They stay closer to reality than docs — check them first when something here looks off.

* [anza-xyz/kit](https://github.com/anza-xyz/kit) — `@solana/kit` source; canonical for RPC types and transaction-builder semantics
* [solana-foundation/solana-web3.js](https://github.com/solana-foundation/solana-web3.js) — `@solana/web3.js` v3 source and the official v1 to v3 migration guide
* [solana-foundation/anchor](https://github.com/solana-foundation/anchor) — Anchor 1.0 source; framework behavior cross-checked against master
* [solana-foundation/solana-dev-skill](https://github.com/solana-foundation/solana-dev-skill) — Solana Foundation's Claude Code skill; opinionated stack defaults cross-checked against
* [solana-foundation/templates](https://github.com/solana-foundation/templates) — `create-solana-dapp` scaffolder templates
* [codama-idl/codama](https://github.com/codama-idl/codama) — IDL → typed-client codegen referenced in the "generate clients from IDL" section
