solana-kitlisted
Install: claude install-skill sendaifun/skills
# Solana Kit Development Guide
A comprehensive guide for building Solana applications with `@solana/kit` - the modern, tree-shakeable, zero-dependency JavaScript SDK from Anza.
## Overview
Solana Kit (formerly web3.js 2.0) is a complete rewrite of the Solana JavaScript SDK with:
- **Tree-shakeable**: Only ship code you use (-78% bundle size)
- **Zero dependencies**: No third-party packages
- **Functional design**: Composable, no classes
- **10x faster crypto**: Native Ed25519 support
- **TypeScript-first**: Full type safety
## Quick Start
### Installation
```bash
npm install @solana/kit
```
For specific program interactions:
```bash
npm install @solana-program/system @solana-program/token
```
### Minimal Example
```typescript
import {
createSolanaRpc,
createSolanaRpcSubscriptions,
generateKeyPairSigner,
lamports,
pipe,
createTransactionMessage,
setTransactionMessageFeePayer,
setTransactionMessageLifetimeUsingBlockhash,
appendTransactionMessageInstruction,
signTransactionMessageWithSigners,
sendAndConfirmTransactionFactory,
getSignatureFromTransaction,
} from "@solana/kit";
import { getTransferSolInstruction } from "@solana-program/system";
const LAMPORTS_PER_SOL = BigInt(1_000_000_000);
async function transferSol() {
// 1. Connect to RPC
const rpc = createSolanaRpc("https://api.devnet.solana.com");
const rpcSubscriptions = createSolanaRpcSubscriptions("wss://api.devnet.solana.com");
// 2. Create signers
const sender = await genera