Migration guides
Migrating to v0.2
Introduction
Welcome to the updated version of thefuse_wallet_sdk. Our primary objective for this migration is to seamlessly align our services with the evolving landscape of EVM-based chains. We are thrilled to introduce the incorporation of the new standard, EIP 4337, commonly known as “Account Abstraction”. This latest protocol promises to enhance security, provide more consistent developer experiences, and offer improved user interactions in Ethereum-based environments.
Major Changes at a Glance:
- Seamless Smart Wallet Creation: Gone are the days where we required an API request to the Fuse APIs to craft a smart wallet. With the renewed
fuse_wallet_sdk, initiation not only sets the SDK in motion but also seamlessly creates a smart wallet for the given owner. This elevates user experience, reduces developer friction, and augments transactional efficiency.
Prerequisites
Before embarking on this migration journey with the newfuse_wallet_sdk, the process is made delightfully simple for our users. However, there’s a minimal requirement you should be aware of:
- API Key: The only prerequisite to utilize the updated SDK is to have a valid API key. If you haven’t create one yet or need a new one, don’t fret! Simply head over to our Developer’s Console at https://console.fuse.io/build and follow the straightforward steps to obtain your key.
fuse_wallet_sdk.
Detailed Migration Steps
Initialization and Smart Wallet Creation- Locate the Old Initialization:
Start by finding your old SDK initialization in your code. This is typically where you have the
FuseWalletSDKinstantiation. - Remove Wallet Creation Steps: In the old SDK, there were multiple steps involved in creating a smart wallet, including authenticating the credentials, creating a wallet, and handling the creation events. These steps are now greatly simplified in the new SDK.
- The authentication step:
await fuseWalletSDK.authenticate(credentials); - The wallet creation step:
await fuseWalletSDK.createWallet(); - The entire
onSmartWalletEventfunction and its associated event listening code.
- Update SDK Initialization: Replace the old initialization:
- Access the Smart Contract Wallet Address: In the new SDK, you can obtain the smart contract wallet address directly after initialization. Replace the older method:
Migrating to v0.1
The new Smart Wallets SDK uses the same smart contract wallet architecture. Therefore, the migration to the SDK will be seamless for existing projects. We have already migrated all previously created wallets, but some breaking changes must be considered.Changes from Charge Wallet SDK to Smart Wallets SDK
Field name changes
The following field names have changed in Smart Wallets SDK:accountAddressfield name has changed toownerAddressand the new field contains a checksum value instead of an all-lowercase string.walletAddressfield name has changed tosmartWalletAddress
Removed fields
The following fields were removed and do not exist in the smart wallet schema:backupbalancesOnForeignapy
Deprecated APIs
- Job API was deprecated, and instead, an event-driven architecture was implemented. Therefore to check the status of relay jobs, developers now need to use the SDK events, which also improve the overall experience and performance of the SDK.
- Sign-up and Login APIs were deprecated, and Smart Wallets SDK no longer provides end-user authentication. If needed, developers must implement end-user authentication and map created Smart Wallets with their users’ accounts on their backend.
- Backup API was deprecated, and developers must implement a backup of private keys for their users if needed.
- Contacts API was deprecated and developers need to implement any contacts-related features in their apps.