Overview
This document provides guidance for users migrating from other providers (such as thirdweb, Venly, etc.) to Sequence’s Embedded Wallets. The primary recommended approach is a Just-In-Time (JIT) migration pattern, which occurs when users log in for the first time after the migration.Recommended Migration Process
The migration process is designed to smoothly transition users from their existing wallet provider to Sequence Embedded Wallets with minimal disruption to their experience. Our Web-SDK leverages wagmi methods under the hood, so most existing logic in your application will be compatible. This process occurs automatically when a user logs in for the first time after the migration has been implemented where the process looks like the following generally:-
User Authentication
- When a user attempts to log in, user authenticates with their desired social provider or email using a Sequence SDK.
- Once the user is authenticated, the user data such as email address or other unique user identifier along with the Sequence wallet address is passed to your backend.
idToken
from the Sequence SDK and pass it to your backend to verify the user email and address from there to link it in your backend. Here’s the guide to request the token from your frontend and verify it from your backend. -
Database Lookup and Update
Now that we have verified credentials in your backend, we can modify your user database to track if a Sequence wallet exists for the user already.
- Update your user database with a ‘sequenceWallet’ column.
- The database is queried with the unique user identifier to retrieve the corresponding user’s record.
- The system checks if a ‘sequenceWallet’ already exists for this user. If so, no action is taken.
- If no Sequence wallet address is found: a. The passed sequence wallet is inserted in the ‘sequenceWallet’ column.
- If a user doesn’t exist in the database, insert the passed information as a net-new user.
-
Asset Migration
- After the user is successfully logged in, the system checks if asset migration has already occurred.
- If not, a prompt is displayed to the user, explaining the need to migrate their assets from their old wallet to the new Sequence wallet.
- The user logs in to the previous provider as a one-time event via a specific migration page, and moves their desired assets to their new Sequence wallet.
- We suggest using Sequence’s Indexer to query the relevant assets to display these along with amounts to the user for ease of migration.
Migrating from thirdweb to Sequence
User Authentication
Thirdweb offers its own providers and authentication methods. To begin the migration process, it’s important to identify where these are used in your codebase. Once you know where these are located you will be be able to switch to the Sequence.Sequence dependencies installation
pnpm
Migrating from thirdweb Providers to Sequence Providers
Migrating from thirdweb Login Functions to Sequence Login Functions
- React Boilerplate – A React-based starter project integrated with the Sequence Embedded Wallet.
- Next.js Boilerplate – A Next.js-based starter project also integrated with the Sequence Embedded Wallet.