2οΈβ£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
import { Fuul } from ('@fuul/sdk');
// Create code
await Fuul.createAffiliateCode({
address: '0x12345',
code: 'my-affiliate-code',
signature: '0x12345'
})
// Update code
await Fuul.updateAffiliateCode({
address: '0x12345',
code: 'my-new-cool-code',
signature: '0x123455'
})
v7.x
import { Fuul } from ('@fuul/sdk');
// Create code
await Fuul.createAffiliateCode({
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
code: 'my-affiliate-code'
})
// Update code
await Fuul.updateAffiliateCode({
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
code: 'my-new-cool-code'
})
For more information on getting the affiliate link, check out this guide.
Last updated