Skip to main content

GitHub Repository

Dependencies

  • java.net.http
  • systems.comodal.json_iterator
  • software.sava.core

Features

HTTP

See the official Solana docs for context on each HTTP RPC method.

Create Client

Fetch & Parse Accounts

Query Program Accounts with Filters

Note: You will need access to an RPC node which has getProgramAccounts enabled, such as Helius.
Retrieve all lookup tables which are active and frozen.

Fetch Transactions & Blocks

The built-in client automatically requests maxSupportedTransactionVersion: 1 for getTransaction and for getBlock with BlockTxDetails.full. Both requests use Base64 transaction bytes. Other block-detail modes omit the version ceiling; request full to retrieve serialized transactions. The destination node and cluster still determine which transaction versions are available. Given a transaction signature, inspect its wire version and v1 configuration:
For a block slot, each BlockTx also exposes skeleton():
version() is 1 for v1, 0 for v0, and negative for legacy. Both skeleton helpers deserialize on each call and return null when transaction bytes are absent or empty. BlockTx reads the version from those bytes through its skeleton. Execution results, such as the fee and consumed compute units, are available through meta() when present.

Version Errors & Submission Results

These failures describe different stages of a request: For a JSON-RPC error, join() throws a CompletionException whose cause is a JsonRpcException. Preserve an Unknown case when handling error variants. A successful sendTransaction response supplies a transaction signature. Check its confirmation status and execution error afterward; skipping preflight can return a signature even when the runtime will reject the transaction. See the transaction lifecycle guide for building, simulation, signing, and submission, including how to adjust v1 limits after simulation.

Request Encodings

Use RpcEncoding.base64, or RpcEncoding.base64_zstd (base64+zstd) for account requests that support compression. Transaction fetch, simulation, and submission use Base64. Account parsing remains client-side through the typed account factories; jsonParsed is intentionally absent.

WebSocket

See the official Solana docs for context on each WebSocket RPC method.

Create Client

Stream Program Accounts

Token Accounts

Address Lookup Tables

Provider Specific Subscriptions

Subscription methods which are not part of the standard Solana API, or not supported by public RPC infrastructure, are reachable via the generic subscribe passthrough. You provide the method names, request parameters JSON, and a response parser; subscriptions are replayed if the connection is re-established. See HeliusRpcWebsocket for a complete example wrapping Helius’ transactionSubscribe.