> For the complete documentation index, see [llms.txt](https://docs.ston.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ston.fi/developer-section.md).

# Developer section

- [Quickstart](https://docs.ston.fi/developer-section/quickstart.md): Choose Omniston, Widget, or direct DEX integration and open the guide for your task.
- [Omniston](https://docs.ston.fi/developer-section/omniston.md): Choose an Omniston integration for custom aggregated swaps on TON and across chains.
- [Glossary](https://docs.ston.fi/developer-section/omniston/glossary.md): Definitions of Omniston terms and roles.
- [SDK integration](https://docs.ston.fi/developer-section/omniston/sdk.md): Choose the base JavaScript/TypeScript SDK or React hooks and a chain-specific wallet guide.
- [TypeScript and JavaScript](https://docs.ston.fi/developer-section/omniston/sdk/nodejs.md): Receive quotes, submit swaps or orders, and track settlement with the base Omniston SDK and API v1beta8.
- [React](https://docs.ston.fi/developer-section/omniston/sdk/react.md): Flow-based guide for integrating the Omniston React SDK in applications
- [TON wallet integration](https://docs.ston.fi/developer-section/omniston/sdk/ton.md): Convert built TON messages to wallet input, preserve all messages, and obtain a tracking identifier.
- [EVM wallet integration](https://docs.ston.fi/developer-section/omniston/sdk/evm.md): EVM-specific Omniston SDK integration docs.
- [Wallet kinds](https://docs.ston.fi/developer-section/omniston/sdk/evm/evm-wallet-kind.md): Understand EVM wallet kinds and how they affect Omniston integrations.
- [Allowance](https://docs.ston.fi/developer-section/omniston/sdk/evm/evm-allowance.md): Understand EVM allowance methods for Omniston and choose between EIP-2612, Permit2, and native ERC-20 approve.
- [Signatures](https://docs.ston.fi/developer-section/omniston/sdk/evm/evm-signature.md): Understand how EVM wallet kind affects the signature format sent to Omniston.
- [TRON wallet integration](https://docs.ston.fi/developer-section/omniston/sdk/tron.md): TRON-specific Omniston SDK notes for cross-chain order settlement.
- [Supported chains and assets](https://docs.ston.fi/developer-section/omniston/chains.md): Networks, SDK chain fields, wallet integration, and token contract addresses.
- [Environments and endpoints](https://docs.ston.fi/developer-section/omniston/environments.md): Production and sandbox endpoints for trading, History, and the reference application.
- [Settlement lifecycle](https://docs.ston.fi/developer-section/omniston/how-omniston-works.md): Protocol-level Omniston concepts for RFQs, settlement modes, orders, executions, HTLC-based cross-chain settlement, timings, and fees.
- [Integrator fees](https://docs.ston.fi/developer-section/omniston/referral-fees.md): Configure current v1beta8 integrator addresses, pips, quote amounts, and settlement-specific payout paths.
- [History API](https://docs.ston.fi/developer-section/omniston/history.md): Read finalized Omniston orders and aggregate historical swap metrics through gRPC or JSON-RPC.
- [Direct API integration](https://docs.ston.fi/developer-section/omniston/swap.md): Choose current v1beta8 WebSocket JSON-RPC or gRPC for a custom-language integration.
- [WebSocket API v1beta8](https://docs.ston.fi/developer-section/omniston/swap/overview.md): Current JSON-RPC methods, quote subscriptions, transaction building, and settlement tracking.
- [gRPC API v1beta8](https://docs.ston.fi/developer-section/omniston/swap/grpc.md): Generate current protobuf trader clients, receive streaming quotes, build settlement, and track its result.
- [API model v1beta8](https://docs.ston.fi/developer-section/omniston/swap/v1beta8.md): Current object relationships, settlement branches, raw order data, and fee fields.
- [Resolvers](https://docs.ston.fi/developer-section/omniston/resolvers.md): Provide executable quotes and source/destination liquidity through the resolver integration surface.
- [Resolver integration](https://docs.ston.fi/developer-section/omniston/resolvers/guide.md): Enroll, authenticate, and implement current v1beta8 quote and order events on a bidirectional gRPC stream.
- [Versions and migrations](https://docs.ston.fi/developer-section/omniston/migration.md): API support status and migration paths for protocol and SDK integrations.
- [API v1beta7 to v1beta8](https://docs.ston.fi/developer-section/omniston/migration/v1beta7-to-v1beta8-migration-guide.md): Update asset types, fee units, settlement branches, and tracking when migrating Omniston API v1beta7 to v1beta8.
- [SDK 0.7 to 0.8](https://docs.ston.fi/developer-section/omniston/migration/migration-v0.7-to-v0.8.md): Prompt and checklist for migrating @ston-fi/omniston-sdk-react from v0.7 and Omniston API v1beta7 to v0.8 and v1beta8.
- [Legacy WebSocket API v1beta7](https://docs.ston.fi/developer-section/omniston/migration/websocket.md): Versioned WebSocket reference for existing Omniston v1beta7 integrations.
- [Legacy gRPC API v1beta7](https://docs.ston.fi/developer-section/omniston/migration/grpc.md): Versioned gRPC reference for existing Omniston v1beta7 integrations.
- [Legacy TON route data](https://docs.ston.fi/developer-section/omniston/migration/advanced.md): Historical SwapChunk extra-data formats for existing API v1beta7 integrations.
- [TON payout contract reference](https://docs.ston.fi/developer-section/omniston/migration/fee-payouts.md): Deployment-specific TON fee-Vault and escrow collection recipes for existing accrued payouts.
- [Widget](https://docs.ston.fi/developer-section/widget.md): Embed a ready-made TON swap interface with configurable wallets, assets, fees, and styling.
- [Integration and configuration](https://docs.ston.fi/developer-section/widget/widget.md): Integrate Omniston swaps using the core JavaScript widget package
- [DEX](https://docs.ston.fi/developer-section/dex.md): Direct pool swaps, liquidity, LP farming, data APIs, and contract references on TON.
- [Fees](https://docs.ston.fi/developer-section/dex/fees.md): Trading fees on STON.fi - per‑pool configurable fees
- [SDK integration](https://docs.ston.fi/developer-section/dex/sdk.md): Install the SDK for direct DEX and Farm operations, or find version-specific migration guidance.
- [Setup and environments (DEX v2)](https://docs.ston.fi/developer-section/dex/sdk/v2.md): Shared client setup, mainnet simulation and router metadata, testnet scope, and asset units.
- [Swap](https://docs.ston.fi/developer-section/dex/sdk/swap.md): Build and submit a direct DEX v2 swap, then inspect its result.
- [Add liquidity](https://docs.ston.fi/developer-section/dex/sdk/provide-liquidity.md): Simulate a deposit, preserve its message legs, and check issued LP tokens.
- [Withdraw liquidity](https://docs.ston.fi/developer-section/dex/sdk/burn-lp-tokens.md): Burn issued LP tokens and release the underlying pool assets.
- [Recover pending liquidity](https://docs.ston.fi/developer-section/dex/sdk/refund-liquidity.md): Refund assets held in an LP account before LP issuance.
- [Claim integrator fees](https://docs.ston.fi/developer-section/dex/sdk/vault-operations.md): Discover DEX v2 fee Vaults and build withdrawals for the owner wallet.
- [Farm](https://docs.ston.fi/developer-section/dex/sdk/farm.md): STON.fi yield farming guide - stake LP tokens to earn additional rewards on top of trading fees
- [Stake LP tokens](https://docs.ston.fi/developer-section/dex/sdk/farm/stake.md): SDK example for staking tokens - deposit LP tokens into STON.fi farming pools to earn rewards
- [Claim rewards](https://docs.ston.fi/developer-section/dex/sdk/farm/claim.md): SDK example for claiming farming rewards - harvest your earned tokens from STON.fi farming pools
- [Unstake LP tokens](https://docs.ston.fi/developer-section/dex/sdk/farm/unstake.md): SDK example for unstaking tokens - withdraw your LP tokens from STON.fi farming contracts
- [Destroy Farm NFT](https://docs.ston.fi/developer-section/dex/sdk/farm/destroy.md): SDK example for destroying farm NFT - clean up unstaked farming positions and recover storage fees
- [REST API](https://docs.ston.fi/developer-section/dex/api.md): STON.fi DEX API documentation - RESTful interface for programmatic DEX access and data queries
- [API reference](https://docs.ston.fi/developer-section/dex/api/reference.md): STON.fi DEX API reference - REST endpoints for pools, swaps, liquidity, and market data
- [Architecture](https://docs.ston.fi/developer-section/dex/architecture.md): STON.fi DEX architecture explained - understand the smart contract design behind Jetton-to-Jetton swaps
- [Contract reference](https://docs.ston.fi/developer-section/dex/smart-contracts.md): STON.fi smart contract documentation - technical references for v1 and v2 DEX contracts
- [DEX v2 contracts](https://docs.ston.fi/developer-section/dex/smart-contracts/v2.md): STON.fi v2 smart contract API - advanced contracts with vault architecture and gas optimization
- [Router](https://docs.ston.fi/developer-section/dex/smart-contracts/v2/router.md): STON.fi v2 Router smart contract - advanced routing with vault integration for swaps
- [Pool](https://docs.ston.fi/developer-section/dex/smart-contracts/v2/pool.md): STON.fi v2 Pool smart contract - enhanced AMM pools with vault mechanics and optimization
- [LpAccount](https://docs.ston.fi/developer-section/dex/smart-contracts/v2/lpaccount.md): STON.fi v2 LpAccount contract - improved LP position management with vault integration
- [LpWallet](https://docs.ston.fi/developer-section/dex/smart-contracts/v2/lpwallet.md): STON.fi v2 LpWallet contract - enhanced LP token wallet with vault-aware functionality
- [Vault](https://docs.ston.fi/developer-section/dex/smart-contracts/v2/vault.md): STON.fi v2 Vault smart contract - token custody and fee management for enhanced DEX operations
- [Message flows](https://docs.ston.fi/developer-section/dex/smart-contracts/v2/examples.md): Contract interaction diagrams for swaps, liquidity provision, and Vault withdrawals.
- [Swap](https://docs.ston.fi/developer-section/dex/smart-contracts/v2/examples/swap.md): Swap implementation examples - various swap schemes and patterns using v2 smart contracts
- [Liquidity](https://docs.ston.fi/developer-section/dex/smart-contracts/v2/examples/lp-provide.md): Liquidity provision smart contract example - implement LP operations with v2 contracts
- [Vault withdrawal](https://docs.ston.fi/developer-section/dex/smart-contracts/v2/examples/vault.md): Token vault mechanics example - understand v2 vault operations for custody and fee management
- [Op codes](https://docs.ston.fi/developer-section/dex/smart-contracts/v2/op-codes.md): STON.fi v2 operation codes reference - message opcodes for smart contract interactions
- [DEX v1 contracts](https://docs.ston.fi/developer-section/dex/smart-contracts/v1.md): STON.fi v1 smart contract API reference - technical specs for Router, Pool, and LP contracts
- [Router](https://docs.ston.fi/developer-section/dex/smart-contracts/v1/router.md): STON.fi v1 Router smart contract - entry point for swaps and liquidity operations on-chain
- [Pool](https://docs.ston.fi/developer-section/dex/smart-contracts/v1/pool.md): STON.fi v1 Pool smart contract - AMM pool implementation with constant product formula
- [LpAccount](https://docs.ston.fi/developer-section/dex/smart-contracts/v1/lpaccount.md): STON.fi v1 LpAccount contract - manages liquidity provider positions and LP token minting
- [LpWallet](https://docs.ston.fi/developer-section/dex/smart-contracts/v1/lpwallet.md): STON.fi v1 LpWallet contract - LP token wallet implementation for liquidity providers
- [Versions and migrations](https://docs.ston.fi/developer-section/dex/migration.md): Separate deployed DEX contract generations from npm SDK upgrade paths.
- [DEX v1 integration](https://docs.ston.fi/developer-section/dex/migration/v1.md): STON.fi DEX v1 SDK documentation - integrate swaps, liquidity provision, and LP token management
- [Reference](https://docs.ston.fi/developer-section/dex/migration/v1/reference.md): STON.fi DEX v1 SDK methods reference - complete API documentation for router and pool interactions
- [Swap](https://docs.ston.fi/developer-section/dex/migration/v1/swap.md): Execute token swaps on STON.fi v1 - trade assets through AMM pools with minimal slippage
- [Add liquidity](https://docs.ston.fi/developer-section/dex/migration/v1/provide-liquidity.md): Provide liquidity on STON.fi v1 - add token pairs to pools and earn trading fees as LP
- [Recover pending liquidity](https://docs.ston.fi/developer-section/dex/migration/v1/refund-liquidity.md): Refund liquidity on STON.fi v1 - handle failed liquidity provision and recover deposited tokens
- [Withdraw liquidity](https://docs.ston.fi/developer-section/dex/migration/v1/burn-lp-tokens.md): Burn liquidity tokens on STON.fi v1 - remove liquidity and receive underlying token pairs
- [Legacy npm SDKs](https://docs.ston.fi/developer-section/dex/migration/legacy.md): STON.fi legacy SDK documentation - reference for deprecated v0.4 and v0.5 SDK versions
- [SDK 0.5](https://docs.ston.fi/developer-section/dex/migration/legacy/v0.5.md): STON.fi SDK v0.5 documentation - legacy SDK version for backward compatibility
- [Swap](https://docs.ston.fi/developer-section/dex/migration/legacy/v0.5/swap.md): Legacy v0.5 swap guide - exchange TON for Jettons using deprecated SDK
- [Add liquidity](https://docs.ston.fi/developer-section/dex/migration/legacy/v0.5/lp_provide.md): Legacy v0.5 Jetton/Jetton pool deposits - provide liquidity to token pairs
- [Recover pending liquidity](https://docs.ston.fi/developer-section/dex/migration/legacy/v0.5/lp_refund.md): Legacy v0.5 liquidity refund - handle failed liquidity provision operations
- [Withdraw liquidity](https://docs.ston.fi/developer-section/dex/migration/legacy/v0.5/lp_burn.md): Legacy v0.5 LP burn guide - remove liquidity from Jetton/Jetton pools
- [SDK 0.4](https://docs.ston.fi/developer-section/dex/migration/legacy/v0.4.md): STON.fi SDK v0.4 documentation (deprecated) - legacy reference for maintaining older integrations
- [Swap](https://docs.ston.fi/developer-section/dex/migration/legacy/v0.4/swap.md): Legacy v0.4 token swap guide - execute swaps using deprecated SDK methods
- [Add liquidity](https://docs.ston.fi/developer-section/dex/migration/legacy/v0.4/lp_provide.md): Legacy v0.4 liquidity provision - add liquidity to pools using deprecated SDK methods
- [Recover pending liquidity](https://docs.ston.fi/developer-section/dex/migration/legacy/v0.4/lp_refund.md): Legacy v0.4 liquidity refund - recover tokens from failed liquidity operations
- [Withdraw liquidity](https://docs.ston.fi/developer-section/dex/migration/legacy/v0.4/lp_burn.md): Legacy v0.4 liquidity burn guide - remove liquidity from pools in deprecated SDK version
- [Get methods](https://docs.ston.fi/developer-section/dex/migration/legacy/v0.4/getters.md): Legacy v0.4 getter methods - query pool states and contract data in deprecated SDK
- [Custom router revision](https://docs.ston.fi/developer-section/dex/migration/legacy/v0.4/revision.md): STON.fi v0.4 router revision guide - understanding router contract versions and upgrades
- [DEX v1 to v2 integration](https://docs.ston.fi/developer-section/dex/migration/v1-to-v2.md): Change the deployed contract generation without confusing it with an npm package upgrade.
- [npm SDK 0.5 to 1](https://docs.ston.fi/developer-section/dex/migration/v0.5-to-v1.md): Migration guide from SDK v0.5 to v1.0 - transition to stable API with enhanced features
- [npm SDK 0.4 to 0.5](https://docs.ston.fi/developer-section/dex/migration/v0.4-to-v0.5.md): Migration guide from SDK v0.4 to v0.5 - update your integration with breaking changes
- [TON Basics](https://docs.ston.fi/developer-section/common.md): Wallets, jettons, messages, and transaction sending for STON.fi integrations on TON.
- [Transaction sending](https://docs.ston.fi/developer-section/common/transaction-sending.md): Submit complete TON transactions built by DEX, Farm, or an Omniston wallet adapter.
- [TonConnect](https://docs.ston.fi/developer-section/common/transaction-sending/tonconnect.md): Pass built DEX/Farm parameters to a connected TON wallet without rebuilding a swap.
- [TON Core](https://docs.ston.fi/developer-section/common/transaction-sending/toncore.md): Send a complete SDK parameter array with an existing WalletContractV4 signer.
- [TonWeb](https://docs.ston.fi/developer-section/common/transaction-sending/tonweb.md): Use TonWeb Wallet V4R2 to submit a complete array of built SDK messages.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ston.fi/developer-section.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
