A modern Dart toolkit for building Solana applications with typed RPC, composable transactions, binary codecs, signers, subscriptions, and program clients.
solana_kit brings the ideas and API shape of @solana/kit to Dart while leaning into Dart's strengths: extension types, sealed classes, records, patterns, and fluent composition.
It is designed for apps, CLIs, servers, Flutter projects, tests, and tooling that need to speak Solana without hand-writing JSON-RPC payloads or byte layouts.
- Typed RPC — method helpers such as
rpc.getSlot()andrpc.getLatestBlockhashValue()instead of raw method strings. - Composable transactions — build, sign, size-check, serialize, send, and confirm transactions through small explicit steps.
- Binary codecs — encode and decode Solana data with reusable codecs for numbers, strings, structs, arrays, unions, options, and bytes.
- Signer abstractions — model local key pairs, partial signers, fee payers, sending signers, wallet signers, and no-op signers clearly.
- Subscriptions — consume account, signature, log, slot, and program notifications through WebSocket-backed clients.
- Program tooling — use generated and handwritten clients for core Solana programs and Metaplex/SPL surfaces.
- Latest supported
@solana/kitversion:8.5.0 - This Dart port tracks upstream APIs and behavior through
v8.5.0.
Each row pairs a published solana_kit release with the upstream @solana/kit version it tracks. Use the row that matches your Dart dependency to know which upstream release its APIs and behavior correspond to. The solana_kit version is the workspace compatibility marker; the other packages release independently.
solana_kit |
@solana/kit |
Released |
|---|---|---|
0.9.3 |
8.2.0 |
2026-09-12 |
0.9.2 |
8.2.0 |
2026-09-06 |
0.9.1 |
8.1.0 |
2026-08-30 |
0.8.0 |
7.1.0 |
2026-08-19 |
0.7.0 |
7.1.0 |
2026-08-18 |
0.6.0 |
6.10.0 |
2026-08-13 |
0.5.0 |
6.9.0 |
2026-06-01 |
0.4.0 |
6.9.0 |
2026-05-30 |
0.3.1 |
6.5.0 |
2026-03-30 |
0.3.0 |
6.5.0 |
2026-03-29 |
0.2.1 |
6.1.0 |
2026-02-28 |
0.2.0 |
— | 2026-02-28 |
0.1.0 |
— | 2026-02-25 |
Parity with intent
The project follows
@solana/kitclosely where parity matters: addresses, signatures, transaction compilation, serialization, RPC behavior, and selected error semantics.When Dart intentionally differs for safety or ergonomics, the difference should be documented instead of hidden behind a silent compatibility change.
Install the package directly:
dependencies:
"solana_kit": ^0.11.0If your app uses several Solana Kit packages together, you can also depend on the umbrella package instead:
dart pub add solana_kitInside this monorepo, Dart workspace resolution uses the local package automatically.
Program packages such as solana_kit_loader can be added separately when you need a smaller dependency graph or a specific on-chain program. Browse the full package map on the documentation website.
import 'package:solana_kit/solana_kit.dart';
Future<void> main() async {
final rpc = createSolanaRpc(url: 'https://api.devnet.solana.com');
final slot = await rpc.getSlot().send();
final blockhash = await rpc.getLatestBlockhashValue().send();
print('Current slot: $slot');
print('Latest blockhash: ${blockhash.value.blockhash}');
}rpc.getSlot() creates a typed request. The network call only happens when you call .send(), which keeps requests easy to inspect, compose, cache, batch, or wrap with middleware.
import 'package:solana_kit/solana_kit.dart';
Future<void> main() async {
final signer = generateKeyPairSigner();
print('Address: ${signer.address}');
}Use key-pair signers for tests, automation, server-side flows, and local scripts. Wallet-driven applications can use the signer interfaces to represent fee payers, partial signers, sending signers, and externally managed signatures.
import 'package:solana_kit/solana_kit.dart';
Future<void> main() async {
final rpc = createSolanaRpc(url: 'https://api.devnet.solana.com');
final feePayer = generateKeyPairSigner();
final latestBlockhash = await rpc.getLatestBlockhashValue().send();
final message = createTransactionMessage(version: TransactionVersion.v0)
.withFeePayer(feePayer.address)
.withBlockhashLifetime(
BlockhashLifetimeConstraint(
blockhash: latestBlockhash.value.blockhash.value,
lastValidBlockHeight: latestBlockhash.value.lastValidBlockHeight,
),
);
print(message);
}Transaction construction is deliberately explicit: choose the version, set who pays, set how long the message is valid, then append instructions. That makes fee payment, expiry, and instruction ordering visible in code.
- Dart-first ergonomics — mirror Solana concepts without forcing TypeScript shapes where Dart has a clearer model.
- Type safety at the boundary — catch invalid addresses, malformed data, missing accounts, and impossible states before they become runtime surprises.
- Small, composable pieces — keep codecs, RPC, transactions, signers, accounts, and program clients useful independently.
- Explicit over magical — transaction building, signing, sending, and confirmation are separate steps that can be inspected and tested.
- Parity where it matters — match upstream behavior for wire formats and protocol semantics while documenting intentional Dart differences.
- No hidden package maze — use
solana_kitfor the common path, or import lower-level packages directly when you need tighter control.