v0.5 to v1
Migration guide from SDK v0.5 to v1.0 - transition to stable API with enhanced features
Introduction
import TonWeb from "tonweb";
import { DEX, pTON } from "@ston-fi/sdk";
const router = new DEX.v1.Router({
tonApiClient: new TonWeb.HttpProvider(),
});
const tonToJettonTxParams = await router.buildSwapJettonToTonTxParams({
userWalletAddress: "", // ! replace with your address
offerJettonAddress: "EQA2kCVNwVsil2EM2mB0SkXytxCqQjS4mttjDpnXmwG9T6bO", // STON
offerAmount: new TonWeb.utils.BN("1000000000"),
proxyTonAddress: pTON.v1.address,
minAskAmount: new TonWeb.utils.BN("1"),
queryId: 12345,
});TonWeb package replacement with @ton/ton
Contract constructor interface change
"Opening" of the contracts
build*TxParams methods renaming
build*TxParams methods renamingBN.js replacement with native BigInt
Operations with pTON
txParams shape change and MessageData type drop
txParams shape change and MessageData type dropContracts method renaming
Conclusion
Last updated