Automated jscodeshift migration from @solana/web3.js v1 to @solana/kit (v2).
- User is migrating from @solana/web3.js v1 to v2/@solana/kit
- User has PublicKey, Connection, Keypair, Transaction, or SystemProgram imports from @solana/web3.js
- User asks how to migrate Solana project to Kit/v2
- User gets deprecation warnings about @solana/web3.js
npx solana-codemod ./srcnpm install
npm run build # tsup, outputs to dist/
npm test # vitest, 26 testssrc/transforms/- 6 jscodeshift transform files, each independently runnablesrc/utils/imports.ts- addNamedImport/removeNamedImport helperssrc/utils/constants.ts- v1 to v2 package/symbol mappingssrc/cli.ts- Commander-based CLItest/fixtures/- input.ts/output.ts pairs per transformexamples/- before.ts and after.ts showing full migration
Transforms must run in this order: public-key-to-address, connection-to-rpc, keypair-to-signer, system-program-transfer, transaction-to-pipe, rewrite-imports (last).