# SDK Migration (5.x → 7.x)

Version 7.x expands address support beyond EVM to include **Solana addresses**, **XRPL addresses**, and **email identifiers**. Several function names and parameters have been updated to reflect these multi-network capabilities.

## Summary of changes

| What changed          | v5.x                                 | v7.x                                              |
| --------------------- | ------------------------------------ | ------------------------------------------------- |
| Identify user         | `sendConnectWallet`                  | `identifyUser`                                    |
| Affiliate code params | `address` + `signature`              | `userIdentifier` + `identifierType` + `signature` |
| Identify user params  | `address` + `signature`              | `identifier` + `identifierType` + `signature`     |
| Get referrer          | `getUserAffiliates` (per-conversion) | `getUserReferrer` (per-project)                   |

## 1. sendConnectWallet → identifyUser

**v5.x**

```typescript
import { Fuul } from '@fuul/sdk';

await Fuul.sendConnectWallet({
  address: '0x1234...',
  signature: '0x5678...',
  message: 'Accept affiliate on 18-Aug 2023 00:00:00',
});
```

**v7.x**

```typescript
import { Fuul } from '@fuul/sdk';

await Fuul.identifyUser({
  identifier: '0x1234...',
  identifierType: 'evm_address', // evm_address | solana_address | xrpl_address | sui_address | email
  signature: '0x5678...',
  message: 'Accept affiliate on 18-Aug 2023 00:00:00',
});
```

For more information, see [Tracking Referrals](/developer-guide/tracking-referrals-in-your-app.md).

## 2. Affiliate code parameters

**v5.x**

```typescript
import { Fuul } from '@fuul/sdk';

await Fuul.createAffiliateCode({
  address: '0x1234...',
  code: 'my-affiliate-code',
  signature: '0x5678...',
});

await Fuul.updateAffiliateCode({
  address: '0x1234...',
  code: 'my-new-code',
  signature: '0x5678...',
});
```

**v7.x**

```typescript
import { Fuul } from '@fuul/sdk';

await Fuul.createAffiliateCode({
  userIdentifier: '0x1234...',
  identifierType: 'evm_address', // evm_address | solana_address | xrpl_address | sui_address | email
  signature: '0x5678...',
  code: 'my-affiliate-code',
});

await Fuul.updateAffiliateCode({
  userIdentifier: '0x1234...',
  identifierType: 'evm_address',
  signature: '0x5678...',
  code: 'my-new-code',
});
```

For more information, see [Affiliate Links & Codes](/developer-guide/creating-affiliate-links-or-codes.md).

## 3. Getting the user referrer

`getUserAffiliates` has been replaced by `getUserReferrer`.

|                   | v5.x (`getUserAffiliates`)                   | v7.x (`getUserReferrer`) |
| ----------------- | -------------------------------------------- | ------------------------ |
| Returns           | Array of conversions, each with its referrer | A single referrer        |
| Attribution level | Per conversion                               | Per project              |

Attribution is now defined at the **project level** instead of per conversion, so `getUserReferrer` returns a single referrer for the user rather than one per conversion.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fuul.xyz/developer-guide/migrating-from-5.x-to-7.x-version.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
