solana-dev-kit-web3-interop
How to handle legacy web3.js code — web3.js v3 (Kit internals, 3.0.0 since Oct 2026) is the migration target; defer migration mechanics to the official migration skill.
- License 许可
- MIT
- 最近更新
- 2026-11-02
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- solana-dev-kit-web3-interop
- license
- MIT
- metadata
- { "author": "Solana Foundation", "source": "https://github.com/solana-foundation/solana-dev-skill", "version": "2.7.0", "category": "Tooling" }
- description
- How to handle legacy web3.js code — web3.js v3 (Kit internals, 3.0.0 since Oct 2026) is the migration target; defer migration mechanics to the official migration skill.
03 SKILL.md 正文
Kit ↔ web3.js Interop
Solana Foundation skill — mirrored in the Musebook skills hub. This entry reproduces, verbatim, the
kit-web3-interop.mdreference of the foundation-maintained solana-dev skill (v2.7.0, MIT) from https://github.com/solana-foundation/solana-dev-skill. It is one of the 16 topic references the solana-dev router discloses progressively; for the full skill (router + all references + nested guides), install the upstream original:npx skills add https://github.com/solana-foundation/solana-dev-skill— also mirrored in this hub as thesolana-deventry. Maintained by the Solana Foundation; Musebook does not author or maintain this content. Relative links in the body point at the upstream skill's file layout and resolve in the full install.
Kit ↔ web3.js Interop
The landscape (2026)
@solana/web3.js v3 is a rebuild of the classic class-based API (Connection, Keypair, Transaction) on top of @solana/kit internals, co-developed by Blueshift and the Solana Foundation.
Status: stable. @solana/web3.js 3.0.0 shipped on 2026-10-01 (3.1.1 as of Oct 19) together with a new @solana/wallet-adapter 3.0 package. 3.1.x depends on @solana/kit ^8.5.0 (3.0.x on ^8.4.0). 3.x is now the latest dist-tag, so npm i @solana/web3.js installs it; a codebase that has to stay on 1.x pins @solana/web3.js@1. The v3 work now lives on the repo's main branch (the v3.x branch is gone; 1.x continues on maintenance/v1.x). Treat v3 as the migration target for v1 codebases, not a default recommendation for new work.
The 3.0.0 release notes list the breaking changes from 1.x. The ones that bite most: Keypair.generate() / fromSecretKey() / fromSeed() and Transaction.serialize() are async, Connection's implicit default commitment is now confirmed (was finalized), many Connection results are bigint and Uint8Array instead of number and Buffer, and getRecentBlockhash / FeeCalculator / the Account class are gone.
Decision routing
- Greenfield code → use
@solana/kit+ plugins directly. Don't add web3.js at all. See kit/overview.md. - Migrating a v1 codebase → use the official migration skill. It is maintained alongside the source in the solana-web3.js repo and kept current with each release, so prefer it over hand-migrating from memory:
(Or install from the repo and select it:npx skills add https://github.com/solana-foundation/solana-web3.js/tree/main/skills/web3js-v1-to-v3-migrationnpx skills add solana-foundation/solana-web3.js -s web3js-v1-to-v3-migration.) A companion guide in the same repo covers@solana/spl-token→@solana-program/token. - Found
@solana/web3-compatin a codebase → it is superseded (an interim shim running the v1 API on Kit 5). Do not introduce it in new work; plan a migration to v3 or Kit. - A dependency expects v1 objects (
Connection, syncKeypair) → upgrade the dependency or isolate it in an adapter module. Do not downgrade your app to v1, and do not let legacy class types leak across the app.
Why the boundary is cheap in v3
Because v3 is built on Kit, the seams are shared types rather than conversion shims:
PublicKeyis a deprecated alias of v3'sAddressclass.- A v3
Keypairstructurally satisfies Kit'sKeyPairSigner— it can be passed directly to Kit APIs, Kit plugins, and Codama-generated clients.
The migration skill covers the rest (async signing, bigint RPC numerics, removed APIs, commitment defaults).
References
- Repo (v3 on
main): https://github.com/solana-foundation/solana-web3.js - Migration guide: https://github.com/solana-foundation/solana-web3.js/blob/main/docs/web3js-v1-to-v3-migration.md
- Migration skill: https://github.com/solana-foundation/solana-web3.js/blob/main/skills/web3js-v1-to-v3-migration/SKILL.md
- API docs: https://solana-foundation.github.io/solana-web3.js/
04 同仓库更多 Skills
youtube-clipper
YouTube 视频智能剪辑工具。下载视频和字幕,AI 分析生成精细章节(几分钟级别), 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频,并生成总结文案。 使用场景:当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词:视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video
viem-integration
Integrate EVM blockchains using viem. Use when user says "read blockchain data", "send transaction", "interact with smart contract", "connect to Ethereum", "use viem", "use wagmi", "wallet integration", "viem setup", or mentions blockchain/EVM development with TypeScript.
v4-security-foundations
Security-first Uniswap v4 hook development. Use when user mentions "v4 hooks", "hook security", "PoolManager", "beforeSwap", "afterSwap", or asks about V4 hook best practices, vulnerabilities, or audit requirements.
v4-sdk-integration
App-layer SDK guide for building swap and liquidity experiences directly with the Uniswap v4 SDK. Use when user asks about "v4 sdk", "uniswap v4", "v4 swap", "v4 liquidity", "PoolManager", "V4Planner", "StateView", "PositionManager", "pool state", "v4 position", "uniswap sdk", or when building swap/liquidity UX directly with SDKs rather than via the Trading API.
v4-hook-generator
Generate Uniswap v4 hook contracts via OpenZeppelin MCP. Use when building custom swap logic, async swaps, hook-owned liquidity, custom curves, dynamic fees, MEV protection, limit orders, or oracle hooks.
testing
For testing with Light Protocol programs and clients on localnet, devnet, and mainnet validation.