Skip to main content
This section contains practical examples demonstrating how to use the Sava SDK for common Solana development tasks.

Available Examples

Account Management

Creating Keypairs

Learn how to generate keypairs, load from seeds, and derive PDAs

Token Operations

Token Accounts

Subscribe to and monitor token account changes in real-time

Advanced Features

Address Lookup Tables

Work with address lookup tables to optimize transaction size

Example Source Code

All examples are available in the sava-examples repository. The code shown in these guides is taken directly from working examples that you can run and modify.

Running Examples

To run any of the examples:
  1. Clone the Sava repository:
git clone https://github.com/sava-software/sava.git
cd sava/sava-examples
  1. Build the project:
mvn clean install
  1. Run a specific example:
mvn exec:java -Dexec.mainClass="software.sava.examples.SubscribeToTokenAccounts"

Prerequisites

Most examples require:
  • Java 21 or higher
  • Maven 3.6 or higher
  • An RPC endpoint (Helius, Alchemy, or local validator)
  • Basic understanding of Solana concepts

Build docs developers (and LLMs) love