今日已更新 347 条资讯 | 累计 25427 条内容
关于我们

How to Install and Configure the STON.fi SDK

Ivan “Crypto Vazima” Zimanov 2026年07月29日 14:51 1 次阅读 来源:Dev.to

Set up a TypeScript project, connect the required STON.fi and TON components, and prepare a reliable foundation for swaps and liquidity operations. Installing the STON.fi SDK requires more than adding one npm package. The SDK creates and opens the smart contract wrappers your application needs, but a complete integration usually also requires a TON RPC client, the STON.fi API, and a wallet connection layer. For a production swap application, these components work together. The STON.fi API discovers assets, simulates the trade, and returns the correct Router metadata. The SDK converts that information into contract instances and transaction parameters. TON Connect then asks the user's wallet to approve and send the transaction. The official SDK is written for JavaScript and TypeScript applications and acts as a thin wrapper around STON.fi contracts, including Router, Pool, LP Account, Vault, and pTON contracts. Key takeaways Install @ston-fi/sdk together with @ston-fi/api and @ton/ton . Add a TON Connect package when users will sign transactions through a wallet. Use the STON.fi API to simulate operations and discover the appropriate Router. Avoid hardcoding mainnet Router addresses in production integrations. Keep blockchain units, RPC access, wallet signing, and API data as separate layers. What the STON.fi SDK actually provides The SDK is the contract interaction layer of a STON.fi integration. It gives your application TypeScript classes and helper functions for working with STON.fi smart contracts without manually constructing cells, operation codes, and message bodies. Its main responsibilities include: creating Router and Pool contract wrappers preparing swap transaction parameters preparing liquidity deposit and withdrawal parameters opening LP Account and Vault contracts representing pTON when the native TON asset is involved converting API Router metadata into the correct contract classes The current v2 documentation covers newer contract functionality such

本文内容来源于互联网,版权归原作者所有
查看原文