7οΈβ£Migrating from 5.x to 7.x version
This guide will show you how to migrate from v5 to v7
In this new version, weβve expanded address support beyond EVM-compatible addresses to include Solana addresses, XRPL addresses, and email identifiers. To accommodate this broader scope, several function names and parameters have been updated to better reflect their multi-network and multi-identifier capabilities. This page outlines the changes youβll need to make to ensure compatibility with the new format.
1. SendConnectWallet -> IdentifyUser
v5.x
import { Fuul } from ('@fuul/sdk');
await Fuul.sendConnectWallet({
address: "0x12345",
signature: "0x123485090123",
message: "Accept affiliate on 18-Aug 2023 00:00:00",
});v7.x
import { Fuul } from ('@fuul/sdk');
await Fuul.identifyUser({
userIdentifier: "0x12345", // the address of the user
identifierType: "evm_address", // evm_address | solana_address | xrpl_address
signature: "0x123485090123",
signaturePublicKey: '0x12345' // Only for XRPL type signatures
message: "Accept affiliate on 18-Aug 2023 00:00:00",
});For more information on identifying the user, check out this guide.
2. Create and update affiliate code parameters
v5.x
v7.x
For more information on getting the affiliate link, check out this guide.
3. Geting the user referrer
The getUserAffiliates method has been replaced by getUserReferrer.
While both methods serve a similar purpose conceptually, their behavior differs due to a change in how attribution is handled:
Previous behavior (
getUserAffiliates): Returned an array of conversions, each containing its associated referrer. Attribution was defined at the conversion level.New behavior (
getUserReferrer): Returns a single referrer, as attribution is now defined at the project level instead of per conversion.
Last updated