Local HTTP and JSON-RPC
Point your HTTP or JSON-RPC client at the agent and handle the local API differences.
Use http://127.0.0.1:8080, or your configured listen.http address. Transaction requests and replies use the hosted JSON-RPC and raw HTTP formats.
Connection
The listener supports HTTP/1.1 and cleartext HTTP/2. HTTP/1.1 connections close after 60 idle seconds; clients should reconnect as needed.
Authentication
Local requests use the executable's license; API-key headers and query parameters are ignored. Keep the listener on loopback and restrict access to the host.
Methods and routes
| Method or route | Through the agent |
|---|---|
sendTransaction | Same parameters and options. Preflight differs. |
sendBundle | Same parameters and options |
getTipAccounts, getBundleTipAccounts | Current tip accounts, or [] before the agent receives them |
getTipFloor, GET /tip_floor | Use a hosted endpoint |
getHealth | "ok" when the agent has a region connection or knows the current leaders; otherwise error -32005, Node is unhealthy, with HTTP status 503 |
getSlot | An estimated slot, not a chain-state query; 0 before routing information arrives |
POST /binary, POST /plaintext | Same payloads and replies as hosted HTTP |
GET /health | ok, or unhealthy with HTTP status 503 |
What an accepted reply means explains what a sendTransaction result or a /binary signature means when it comes from the agent.
Preflight
Set skipPreflight: false to request simulation. The agent uses processed commitment even if you supply another valid preflightCommitment; it ignores minContextSlot. As on hosted endpoints, skipPreflight defaults to true and maxRetries has no effect.
Tip floor
Query getTipFloor on a hosted endpoint with your API key. Locally, getTipFloor returns JSON-RPC error -32601 and reason unsupported; GET /tip_floor returns HTTP 404.
Rejections
Rejections use the hosted error format. These are common when connecting a local client:
| Reason | When |
|---|---|
missing_tip | The tip is below the minimum for your key |
not_ready with waiting_for: "tip_vaults" | Tip accounts are not available yet; fetch them again shortly |
not_ready with waiting_for: "upstream" | A region is unavailable or did not answer in time; check network access and logs |
forward_failed | Forwarding failed; follow confirmation and retry guidance |
Examples
curl -sS http://127.0.0.1:8080/healthcurl -sS http://127.0.0.1:8080 \
-H 'content-type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"getTipAccounts"}'Set TX_BASE64 to a signed transaction, encoded as base64, that transfers at least your minimum tip to one of those accounts. The result is the transaction's first signature.
curl -sS http://127.0.0.1:8080 \
-H 'content-type: application/json' \
--data "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"sendTransaction\",\"params\":[\"$TX_BASE64\",{\"encoding\":\"base64\"}]}"An existing @solana/kit client can use the local address. This function takes a transaction your application has already signed:
import {
createSolanaRpc,
getBase64EncodedWireTransaction,
type Transaction,
} from '@solana/kit'
const agent = createSolanaRpc('http://127.0.0.1:8080')
export async function sendThroughAgent(transaction: Transaction) {
return agent
.sendTransaction(getBase64EncodedWireTransaction(transaction), {
encoding: 'base64',
skipPreflight: true,
})
.send()
}The agent is send-only. Fetch blockhashes and check outcomes with your Solana RPC provider.