搜索

PythonReactSEOPDF
GitHub Skill

solana-kit

Solana Kit (JavaScript SDK) — RPC, signers, transactions, accounts, codecs, instruction plans, and program clients for agent-driven Solana tooling.

hairyf☆ 2 仓库 Stars1 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Skill based on Kit (anza-xyz/kit), generated 2026-02-25.

Concise reference for building Solana apps with Kit: functional API, tree-shakeable imports, RPC + RPC Subscriptions, signers, transaction messages, account fetch/decode, codecs, and program clients.

Core References

Topic Description Reference
Setup Install, RPC/RPC Subscriptions, typed client core-setup
RPC HTTP client — getBalance, getAccountInfo, getLatestBlockhash, send core-rpc
RPC Subscriptions WebSocket — accountNotifications, slotNotifications core-rpc-subscriptions
Functional pipe(), pipeline transforms core-functional
Signers KeyPairSigner, airdrop, wallet swap, no-op core-signers
Transactions pipe, fee payer, lifetime, instructions, sign, send-and-confirm core-transactions
Transaction confirmation Block height exceedence, recent signature, nonce invalidation, timeout core-transaction-confirmation
Accounts fetchEncodedAccount, program fetch/decode (fetchMint, decodeMint) core-accounts
Address lookup tables fetchLookupTables, compress message, decompile with lookups core-address-lookup-tables
Addresses Address type, validation, PDA derivation, codecs core-addresses
Sysvars Fetch/decode Clock, Rent, EpochSchedule, etc. core-sysvars

Features

Topic Description Reference
Instructions Program clients — System, Token, Compute Budget features-instructions
Instruction plans Sequential/parallel plans, planner, executor features-instruction-plans
Codecs Encode/decode structs, program getXCodec features-codecs
Compatible program clients @solana-program/*, Codama-generated clients features-compatible-clients
Compat (Web3.js) fromLegacyPublicKey, fromLegacyKeypair, fromVersionedTransaction features-compat
Errors SolanaError, isSolanaError, context features-errors
GraphQL createSolanaRpcGraphQL, nested queries, caching/batching features-graphql
Key pairs generateKeyPair, import bytes, polyfill features-keypairs
Offchain messages Build, sign, verify, encode/decode (sRFC 3) features-offchain-messages
Program errors isProgramError — attribute tx failure to program/code features-program-errors
React useSignIn, useWalletAccountTransactionSigner, useSignAndSendTransaction features-react
RPC transports Custom transport — failover, retry, round-robin, sharding features-rpc-transports
RPC API augmentation mainnet/devnet, cherry-pick methods, custom RPC methods features-rpc-api-augmentation
Create Solana program pnpm create solana-program, Codama-generated JS client features-create-solana-program
Unstable subscriptions createSolanaRpcSubscriptions_UNSTABLE, block/slotsUpdates features-unstable-subscriptions

Best practices

Topic Description Reference
Abort RPC/subscriptions AbortController, timeout, cancel on navigation best-practices-abort-rpc
Tree-shaking Narrow imports, sub-packages, smaller bundles best-practices-tree-shaking
Upgrade from Web3.js Connection → RPC, PublicKey → address, compatible clients best-practices-upgrade

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-03-11
索引更新时间
2026-03-11
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!