We're thrilled to announce the release of STON.fi SDK v2.4.0, packed with critical updates to streamline your development experience.
🆕 What's New?
We've introduced two specialized Router & Pool types:
- WCPI (Weighted CPI)
- WStable (Weighted Stable)
Access them directly in your code:
import { DEX } from "@ston-fi/sdk";
// WCPI Router & Pool
const wcpiRouter = DEX.v2_2.Router.WCPI;
const wcpiPool = DEX.v2_2.Pool.WCPI;
// WStable Router & Pool
const wstableRouter = DEX.v2_2.Router.WStable;
const wstablePool = DEX.v2_2.Pool.WStable;
These new routers will become available through the API starting this Monday.
⚠️ Important Structural Changes & Migration Path
We've deprecated the generic BaseRouter and BasePool classes in favor of explicit router types. This change impacts how you call router methods:
- const swapTxParams = await DEX.Router.getSwapJettonToJettonTxParams();
+ const swapTxParams = await DEX.Router.CPI.getSwapJettonToJettonTxParams();
🚨 Action Required
We highly recommend using the dexFactory approach—it's our preferred and officially supported integration method.
- Using dexFactory? ✅ Great choice! No action required—your integration is already optimized.
- Not using dexFactory? ⚠️ Immediate update required. Generic methods like
DEX.Router.build*TxParams might fail on the new pools due to insufficient gas. Please switch to using dexFactory or explicitly call methods on the specific Router types (e.g., DEX.Router.CPI.build*TxParams).Ensure you upgrade your integration by Monday to avoid possible transaction failures due to gas issues!
Your feedback fuels our ongoing improvements—let's keep building great things together!
Happy coding! 🔥
DEX | Dev docs | AI docs assistant | Guide | Blog | All Links
🐣 X 🤖 Discord 🌐 Reddit 🌐 LinkedIn 📹 YouTube