# Migration Guides

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

## Available Guides

### [v1 to v2](https://docs.ston.fi/developer-section/dex/sdk/migration/v1-to-v2)

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](https://docs.ston.fi/developer-section/dex/sdk/migration/v0.5-to-v1)

Major upgrade with:

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

### [v0.4 to v0.5](https://docs.ston.fi/developer-section/dex/sdk/migration/v0.4-to-v0.5)

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](https://docs.ston.fi/developer-section/dex/sdk)
3. Ask in our [Telegram community](https://t.me/stonfidex)
