The first stable release of the v2 line, with a new module path and a small set of breaking API cleanups. Includes everything from the v1 line up to v1.23.0.
Install
go get github.com/solana-foundation/solana-go/v2@v2.0.0
Requires Go 1.24 or later.
Breaking changes
1. Module path — github.com/gagliardetto/solana-go → github.com/solana-foundation/solana-go/v2
Migrate with a find-and-replace + rebuild:
find . -type f -name '*.go' -exec sed -i.bak \
's|github.com/gagliardetto/solana-go|github.com/solana-foundation/solana-go/v2|g' {} +
go get github.com/solana-foundation/solana-go/v2@v2.0.0
go mod tidy
2. WebSocket subscriptions (#407) — rpc/ws was aligned with the Solana WebSocket JSON-RPC spec. SignatureSubscribe now returns a structured SignatureResult.Value (IsReceived / Processed), and the Account/Program/Signature subscribe config types were reworked. The compiler will flag any call sites that need updating.
3. Loader program packages (#410) — programs/loader-v2, -v3, and -v4 were realigned to the on-chain Loader program specs (account flags, instruction layouts).
Not breaking
rpc/jsonrpc is unchanged from v1 — if you use it directly, only the module path changes.
Staying on v1?
The v1 line continues from main (github.com/gagliardetto/solana-go, latest v1.23.0) with backward-compatible improvements. You only need v2 if you want the changes above.
Full migration guide: v2 README