chore(deps): bump web3auth to v10 #575
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Web3Auth v9 is getting phased out at the end of November. This PR bumps Web3Auth to the latest version.
v9 to v10 migration references:
Example app in manifest-network/manifest-app#588
Published the updated web3auth package to
@manifest-network/web3authv2.16.6-ll.1This pull request updates the Web3Auth wallet integration to support the latest v10 Web3Auth SDK and refactors the codebase to use the new SDK packages and APIs. The changes include major dependency upgrades, migration of types and connection logic, and updates to how the client is initialized and connected. This brings improved compatibility and leverages the latest features and bug fixes from Web3Auth.
Dependency upgrades and SDK migration:
@web3auth/*dependencies inwallets/web3auth/package.jsonto v10 packages, replacing deprecated packages and updating version constraints. Added new dependencies such as@web3auth/auth,@web3auth/modal, andviem. Upgradedtypescriptand related dev dependencies across the project. [1] [2] [3]@web3auth/auth-adapterand@web3auth/baseto@web3auth/authand@web3auth/modal). [1] [2] [3] [4] [5] [6]Type and interface updates:
LOGIN_PROVIDER_TYPE,WEB3AUTH_NETWORK_TYPE, andMfaLevelTypewith the newAUTH_CONNECTION_TYPEand updated all references inWeb3AuthClientOptionsand related types.clientproperty inWeb3AuthClientOptionsto use the newWeb3AuthNoModalOptionstype, removing custom chain config handling.Connection logic and client initialization:
connectClientAndProviderto instantiate the newWeb3Authclient instead ofWeb3AuthNoModal, and removed the use ofCommonPrivateKeyProviderand manual chain config.WALLET_CONNECTORS.AUTH,authConnection, andloginHint. Added a wait loop to ensure the client is ready before proceeding, addressing changes in the v10 SDK's initialization behavior.CONNECTOR_STATUSinstead of the deprecatedADAPTER_STATUS.Other code adjustments:
eccryptoto use theimport * as eccryptosyntax for compatibility with the latest version. [1] [2] [3] [4]These changes collectively modernize the Web3Auth integration and prepare the codebase for future updates and improved stability.