# Migration Guides

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

## Available Guides

### [v1 to v2](/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](/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](/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](/developer-section/dex/sdk.md)
3. Ask in our [Telegram community](https://t.me/stonfidex)


---

# 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.ston.fi/developer-section/dex/sdk/migration.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.
