> For the complete documentation index, see [llms.txt](https://ston-fi.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ston-fi.gitbook.io/docs/developer-section/dex/sdk/migration.md).

# Migration Guides

Step-by-step guides for upgrading between SDK versions.

## Available Guides

### [v1 to v2](/docs/developer-section/dex/sdk/migration/v1-to-v2.md)

Upgrade to the latest SDK version with:

* New contract types (CPI, WStable pools)
* Updated routing architecture
* Utility functions for handling token amounts

### [v0.5 to v1](/docs/developer-section/dex/sdk/migration/v0.5-to-v1.md)

Major upgrade with:

* New API structure
* Improved error handling
* Better TypeScript support

### [v0.4 to v0.5](/docs/developer-section/dex/sdk/migration/v0.4-to-v0.5.md)

Structural improvements:

* Separated product modules
* Standardized method names
* Enhanced documentation

## General Migration Tips

1. **Test Thoroughly**: Always test migrations on testnet first
2. **Update Dependencies**: Ensure all related packages are compatible
3. **Review Breaking Changes**: Each guide lists all breaking changes
4. **Gradual Migration**: Consider migrating feature by feature
5. **Backup**: Keep old version as fallback during migration

## Version Compatibility

| SDK Version | Smart Contracts | Node.js | TypeScript |
| ----------- | --------------- | ------- | ---------- |
| v2.x        | v2              | ≥16     | ≥4.5       |
| v1.x        | v1, v2          | ≥14     | ≥4.0       |
| v0.5        | v1              | ≥12     | ≥3.8       |
| v0.4        | v1              | ≥12     | ≥3.8       |

## Need Help?

If you encounter issues during migration:

1. Check the specific migration guide
2. Review the [SDK documentation](/docs/developer-section/dex/sdk.md)
3. Ask in our [Telegram community](https://t.me/stonfidex)
