Skip to content

Refactor: W3APD-5238 - migrate from @solana/web3.js to @solana/kit#2347

Open
tanguyenvn wants to merge 6 commits intomasterfrom
feat/W3APD-5238-solana-kit
Open

Refactor: W3APD-5238 - migrate from @solana/web3.js to @solana/kit#2347
tanguyenvn wants to merge 6 commits intomasterfrom
feat/W3APD-5238-solana-kit

Conversation

@tanguyenvn
Copy link
Contributor

@tanguyenvn tanguyenvn commented Jan 24, 2026

  • Replace Connection with RPC client from @solana/kit
  • Update transaction types to use @solana/kit's Transaction
  • Remove @toruslabs/bs58 in favor of @solana/kit's base58 utilities
  • Update demo app to use new Solana utilities

BREAKING CHANGE: connection property renamed to rpc, transaction types now expect compiled Transaction from @solana/kit

Motivation and Context

Jira Link:

Description

How has this been tested?

Screenshots (if appropriate):

  1. SOCIAL LOGIN
  • Sign message
image
  • Sign transaction
image
  1. EXTERNAL WALLET: Metamask
  • Sign message
image
  • Sign transaction
image
  • Get idToken
image
  1. WALLET CONNECT: Trust Wallet on mobile
  • Sign message
image
  • Sign transaction
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code requires a db migration.

Note

Medium Risk
Medium risk because it changes Solana transaction construction/signing inputs and the Solana wallet composable API (connectionrpc), which can break downstream integrations at runtime if any callers still rely on @solana/web3.js types or the old fields.

Overview
Migrates Solana integration to @solana/kit across the Vue demo and Web3Auth Solana hooks/composables, replacing @solana/web3.js Connection usage with a @solana/kit rpc client and Transaction type.

Updates the demo’s Solana actions to build transfer instructions and compile legacy/versioned transactions via new utils/solana helpers, and simplifies solHandlers to fetch balances directly via rpc.getBalance(...). Removes the demo walletServiceHandlers file and updates dependencies/lockfile (adds @solana/kit + @solana-program/system, bumps @web3auth/* workspace versions and wagmi/viem-related deps).

Written by Cursor Bugbot for commit 64b6b97. This will update automatically on new commits. Configure here.

- Replace Connection with RPC client from @solana/kit
- Update transaction types to use @solana/kit's Transaction
- Remove @toruslabs/bs58 in favor of @solana/kit's base58 utilities
- Update demo app to use new Solana utilities

BREAKING CHANGE: connection property renamed to rpc, transaction types now expect compiled Transaction from @solana/kit
@vercel
Copy link

vercel bot commented Jan 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web3auth-web Ready Ready Preview, Comment Mar 2, 2026 6:40am

Request Review

@tanguyenvn tanguyenvn changed the title refactor(solana)!: migrate from @solana/web3.js to @solana/kit Refactor: W3APD-5238 - migrate from @solana/web3.js to @solana/kit Jan 27, 2026
}
};

export const signAndSendTransaction = async (provider: IProvider, uiConsole: any) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean up as these functions are not used

import { generateSolTransferInstruction, generateVersionedTransaction } from "../utils/solana";

// EVM
export const walletSignPersonalMessage = async (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean up as these functions are not used

@tanguyenvn
Copy link
Contributor Author

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@tanguyenvn
Copy link
Contributor Author

bugbot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@chaitanyapotti
Copy link
Member

Is there a way to remove all our custom provider wrappers and use the custom signers?

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

- Remove base58 test code and console.log from App.vue

- Remove unused generateKeyPair/generateKeyPairSigner imports from AppDashboard.vue

- Bump @solana-program/system to ^0.12.0

Made-with: Cursor
@tanguyenvn tanguyenvn force-pushed the feat/W3APD-5238-solana-kit branch from c14c849 to 64b6b97 Compare March 2, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants