Skip to content

Conversation

@fmorency
Copy link
Contributor

@fmorency fmorency commented Oct 17, 2025

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/web3auth v2.16.6-ll.1


This 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:

  • Updated @web3auth/* dependencies in wallets/web3auth/package.json to v10 packages, replacing deprecated packages and updating version constraints. Added new dependencies such as @web3auth/auth, @web3auth/modal, and viem. Upgraded typescript and related dev dependencies across the project. [1] [2] [3]
  • Refactored imports throughout the codebase to use the new v10 packages and updated type imports (e.g., from @web3auth/auth-adapter and @web3auth/base to @web3auth/auth and @web3auth/modal). [1] [2] [3] [4] [5] [6]

Type and interface updates:

  • Replaced deprecated types such as LOGIN_PROVIDER_TYPE, WEB3AUTH_NETWORK_TYPE, and MfaLevelType with the new AUTH_CONNECTION_TYPE and updated all references in Web3AuthClientOptions and related types.
  • Simplified the client property in Web3AuthClientOptions to use the new Web3AuthNoModalOptions type, removing custom chain config handling.

Connection logic and client initialization:

  • Updated the connection logic in connectClientAndProvider to instantiate the new Web3Auth client instead of Web3AuthNoModal, and removed the use of CommonPrivateKeyProvider and manual chain config.
  • Changed the login and connection flow to use new API methods and constants, such as WALLET_CONNECTORS.AUTH, authConnection, and loginHint. Added a wait loop to ensure the client is ready before proceeding, addressing changes in the v10 SDK's initialization behavior.
  • Updated status checks and redirect handling to use CONNECTOR_STATUS instead of the deprecated ADAPTER_STATUS.

Other code adjustments:

  • Updated all imports and usages of eccrypto to use the import * as eccrypto syntax for compatibility with the latest version. [1] [2] [3] [4]
  • Adjusted type assertions and validation logic to work with the new enums and types from the updated SDK, ensuring correct network and provider handling. [1] [2]

These changes collectively modernize the Web3Auth integration and prepare the codebase for future updates and improved stability.

@fmorency fmorency marked this pull request as ready for review October 17, 2025 14:26
@fmorency
Copy link
Contributor Author

cc @noahsaso @pyramation

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.

1 participant