Plug in a swap or staking provider when the app needs DeFi flows. Each provider sits on the AppKit instance and supplies data: prices, quotes, and the transactions that the user will sign. The wallet still signs; the provider only prepares. A provider is not a wallet and not a connector. AppKit treats whatever it returns as external input — useful for showing prices, balances, and quotes, but never as proof of settlement.Documentation Index
Fetch the complete documentation index at: https://companyname-a7d5b98e-feature-fumodocs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Before you begin
You need AppKit packages installed and anAppKit instance created. See Prepare your project and Add wallet connectors.
Add a swap provider
Swap providers ship as separate entrypoints under@ton/appkit/swap/* so the bundler only includes the protocols you actually use. Construct an instance and pass it in the providers array on the AppKit constructor; AppKit registers it with the swap manager and the swap hooks (useSwapQuote, useBuildSwapTransaction) start returning quotes from that protocol.
Add a staking provider
UsecreateTonstakersProvider({}) from @ton/appkit/staking/tonstakers the same way:
useStakingQuote, useBuildStakeTransaction) start returning data from the registered provider.
Tips
Provider responses are external data. Validate critical outcomes server side before changing product state — wallet acceptance is not settlement, and a swap quote is not a price guarantee.What to do next
- Continue to Use UI widgets to render full swap and staking UIs with one component each.
- For task-level walkthroughs, see Swaps and Staking.
- See Providers for the full provider model — including the streaming and API client roles not covered here.