Solana Java SDK
Last updated Jul 7, 2026
68
Stars
36
Forks
1
Issues
0
Stars/day
Attention Score
82
Language breakdown
No language data available.
▸ Files
click to expand
README
Sava

Documentation
User documentation lives at sava.software.
- Dependency Configuration
- Core: Common Solana cryptography and serialization utilities.
- RPC: HTTP and WebSocket Clients.
Contributions
Please note that all contributions require agreeing to the Sava Engineering, Inc. CLA.
Tests are needed and welcomed. Otherwise, please reach out before working on a pull request.
RPC Tests
A mini framework for testing RPC calls is provided to make it as easy as possible to test the calls you rely on. See RoundTripRpcRequestTests for example usage.
- If you plan to add several tests, create a new class to avoid merge conflicts.
- If you feel there is already enough response test coverage, you can skip it by only providing the expected request
- If the response JSON is large, add it to the resource directory as a
Capture Request JSON
- Start a test with the desired call, the test will fail with the difference between the expected and actual requests.
@Test
void getHealth() {
registerRequest("{}");
rpcClient.getHealth().join();
}
SEVERE: Expected request body does not match the actual. Note: The JSON RPC "id" does not matter.
- expected: {}
- actual: {"jsonrpc":"2.0","id":123,"method":"getHealth"}
- Or, enable debug logging by using a logging.properties file and pass it to the VM via:
-Djava.util.logging.config.file=logging.properties
Capture Response JSON
var rpcClient = SolanaRpcClient.build().testResponse((_, body) -> {
final var json = new String(body);
System.out.println(json); // Write to a file if large.
return true;
}).createClient();
Validation
Reference the official Solana RPC documentation to verify that the expected parameters are passed in the request, and if applicable, all the desired response data is parsed correctly.
Build
Generate a classic token with the read:packages scope needed to access dependencies hosted on GitHub Package Repository.
~/.gradle/gradle.properties
savaGithubPackagesUsername=GITHUB_USERNAME
savaGithubPackagesPassword=GITHUB_TOKEN
./gradlew check🔗 More in this category