solana-kit

Build Solana transactions, signers, and RPC clients with the @solana/kit TypeScript SDK.

6|20|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/andresdefi/cryptoskills --skill solana-kit-andresdefi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solana-kit
Source: https://github.com/andresdefi/cryptoskills/tree/main/skills/solana-kit
Command: npx skills add https://github.com/andresdefi/cryptoskills --skill solana-kit-andresdefi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers building Solana applications struggle with outdated web3.js 1.x patterns, bloated bundles, and unclear transaction-building APIs. This Skill provides current, accurate guidance for @solana/kit, the modern tree-shakeable, zero-dependency SDK from Anza, covering everything from RPC connections to transaction signing and sending. ## Core Features & Use Cases - Transaction Building with Pipe: Compose versioned transactions functionally using pipe, fee payer setters, blockhash lifetimes, and instruction appending. - Signers and Account Fetching: Generate KeyPairSigners, sign or partially sign transactions, and fetch or decode on-chain accounts with codecs. - Advanced Patterns: Custom RPC transports with retry and failover, compute budget optimization, durable nonces, address lookup tables, and WebSocket subscriptions. - Use Case: You need to transfer SOL from a TypeScript backend. Use this Skill to create an RPC connection, build the transaction with a transfer instruction, sign it, and confirm it on devnet in a few lines of code. ## Quick Start Ask the agent to write a TypeScript script using @solana/kit that transfers 0.1 SOL between two generated wallets on devnet.

Frequently Asked Questions about solana-kit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send a Solana transaction with @solana/kit?

Build a transaction message with pipe by setting the fee payer, blockhash lifetime, and instructions, then sign it with signTransactionMessageWithSigners and submit it using sendAndConfirmTransactionFactory with your RPC and WebSocket connections.

What is the difference between @solana/kit and web3.js 1.x?

@solana/kit is a tree-shakeable, zero-dependency rewrite of web3.js with functional composition instead of classes. It offers roughly 10x faster keypair generation and signing through native Ed25519 crypto, plus full TypeScript type safety.

How do I migrate from web3.js 1.x to @solana/kit?

Use the @solana/compat package to convert legacy types, such as fromLegacyPublicKey for addresses and fromLegacyKeypair for keypairs. The compat package converts from legacy to Kit types; reverse conversion may require manual construction.

Why does my Solana transaction fail with blockhash not found?

The blockhash expired before confirmation, usually because signing or sending took too long. Fetch a fresh blockhash and retry the transaction, or use durable nonce transactions for transactions that must not expire.

How do I decode Solana account data in TypeScript?

Fetch the account with fetchEncodedAccount, then decode its data using struct codecs from @solana/codecs, such as getStructCodec combined with getU64Codec and getBytesCodec. Program packages like @solana-program/token also provide fetchMint and fetchToken helpers.

How do I add priority fees to a Solana transaction?

Prepend compute budget instructions from @solana-program/compute-budget to your transaction. Use getSetComputeUnitLimitInstruction for unit limits and getSetComputeUnitPriceInstruction with microLamports for the priority fee.