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

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Solana RPC Overview

> Intro and overview for the Solana RPC docs. Find cluster endpoints, HTTP and WebSocket references, and the shared structure reference pages.

## In short

RPC is the HTTP/JSON API your code uses to read from and send to the network. Use public endpoints for testing and a provider in production.

<div className="sol-usedin not-prose" data-concept="rpc">
<span className="sol-usedin-label">You've used this in:</span> [Payments <span className="sol-usedin-step">Step 3</span>](/developers/docs/payments/checkout/backend) [Pay-per-call <span className="sol-usedin-step">Step 3</span>](/developers/docs/payments/paywall-api/server) [Tokenized asset <span className="sol-usedin-step">Step 3</span>](/developers/docs/assets/issue-asset/local)
</div>

Solana RPC provides methods to read network state, send transactions, simulate
execution, and subscribe to live updates.

<ol className="sol-flow not-prose" aria-label="How applications use HTTP requests and WebSocket subscriptions to reach Solana through RPC"><li><b>Application</b><span>your client or backend</span></li><li><b>RPC endpoint</b><span>HTTP and WebSocket APIs</span></li><li><b>Validator</b><span>state reads and relay</span></li><li><b>Network</b><span>accounts and programs</span></li></ol>

<Columns cols={2}>
  <Card title="Choose an RPC Provider" href="/developers/docs/rpc/providers">
    Compare production RPC infrastructure.
  </Card>
  <Card title="HTTP Methods" href="/developers/docs/rpc/http">
    Request-response RPC methods.
  </Card>
  <Card title="WebSocket Methods" href="/developers/docs/rpc/websocket">
    Subscription methods.
  </Card>
</Columns>

The RPC tab also holds SDKs, CLI references, and network constants.

<Columns cols={2}>
<Card title="SDKs" icon="code" href="/developers/docs/clients">
TypeScript, Rust, Python, Java, Go, and game engines.
</Card>
<Card title="Solana CLI reference" icon="terminal" href="/developers/docs/references/solana-cli">
Command index and practical examples for the Agave Solana CLI.
</Card>
<Card title="SPL Token CLI reference" icon="coins" href="/developers/docs/references/spl-token-cli">
Command index and examples for SPL Token and Token-2022 mints and accounts.
</Card>
<Card title="Network constants" icon="hash" href="/developers/docs/core/constants-reference">
Every runtime constant: accounts, transactions, fees, compute units, PDAs, and CPIs.
</Card>
<Card title="JSON structures" icon="braces" href="/developers/docs/rpc/json-structures">
The JSON structures that RPC methods return.
</Card>
<Card title="Removed methods" icon="archive" href="/developers/docs/rpc/deprecated">
Migrate from JSON-RPC methods removed in Agave v2.0 to supported methods.
</Card>
</Columns>

<Info>
  Code samples on the HTTP and WebSocket reference pages run on both web3.js v3
  and web3.js (legacy). web3.js v3 returns `bigint` for numeric fields such as
  slots, lamports, and counts (legacy returns `number`), and returns readonly
  arrays.

  The Rust samples target `solana-client` 4.4 with `solana-sdk` 5, which needs
  Rust 1.98.1 or later. They also build with `solana-client` 4.3 and
  `solana-sdk` 4. Keep `solana-transaction-status-client-types` and
  `solana-account-decoder` on the same version as `solana-client`, and add
  `solana-commitment-config` 3, `tokio` (with the `full` feature), and
  `anyhow`. Some samples also use `solana-system-interface` 3 (with the
  `bincode` feature), `futures`, `base64`, and `bincode`.
</Info>

## Cluster Endpoints

The endpoint you call decides which cluster you read from and send to.

| Cluster | Public RPC endpoint              | Description                                                                                       |
| ------- | -------------------------------- | ------------------------------------------------------------------------------------------------- |
| Mainnet | `https://api.mainnet.solana.com` | Production network using real SOL.                                                                |
| Devnet  | `https://api.devnet.solana.com`  | Developer testing network. Use the [Solana Faucet](https://faucet.solana.com/) to get Devnet SOL. |
| Testnet | `https://api.testnet.solana.com` | Validator testing network.                                                                        |

<Info>
  Public endpoints are shared and rate-limited, and aren't meant for production.
  They return `429` when you exceed rate limits and `403` when traffic is
  blocked. For production, [choose an RPC provider](/developers/docs/rpc/providers)
  and follow the [production readiness guide](/developers/docs/tools/production-readiness),
  starting with [RPC infrastructure](/developers/docs/tools/transaction-landing#rpc-infrastructure).
</Info>

For local development, Surfpool and `solana-test-validator` use these default
localhost endpoints:

| Interface | Endpoint                |
| --------- | ----------------------- |
| HTTP RPC  | `http://localhost:8899` |
| WebSocket | `ws://localhost:8900`   |

## Configuring State Commitment

Many methods and subscriptions accept a `commitment` parameter: how final a
block must be before the node returns data or sends a notification.

| Commitment  | Description                                                                                                                |
| ----------- | -------------------------------------------------------------------------------------------------------------------------- |
| `processed` | The node's most recent processed block. This is the newest view, but the block can still be skipped.                       |
| `confirmed` | The same block as `finalized`. Kept for compatibility and planned for removal in a later release.                          |
| `finalized` | A block with a finalization certificate: votes from 80% of stake in one round, or from 60% of stake in each of two rounds. |

`confirmed` and `finalized` return the same data, roughly 150 milliseconds
after a block is produced on mainnet; prefer `finalized` in new code. See
[settlement and finality](/developers/docs/defi/finality).

If a method or subscription accepts `commitment` and you omit it, the default is
typically `finalized`.
