Providers connect AppKit to external data sources and DeFi services. AppKit uses four provider-related components: the API client that reads chain state, the streaming provider that delivers live updates, the swap provider that quotes and builds DEX transactions, and the staking provider that quotes and builds staking transactions. Each component is managed by the matching manager on theDocumentation 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.
AppKit instance.
A provider is not a wallet and not a connector. The wallet still signs every transaction; the connector still owns the session. A provider is the source of data about the chain or about a DeFi protocol, and AppKit treats whatever it returns as external input — useful for showing prices, balances, and quotes, but never as proof of settlement.
| Type | Use | Manager |
|---|---|---|
| API client | Reads blockchain data such as balances, jettons, and NFTs. | AppKit.networkManager |
| Streaming provider | Pushes live balance, transaction, and jetton updates over WebSocket. | AppKit.streamingManager |
| Swap provider | Returns swap quotes and builds swap transactions. | AppKit.swapManager |
| Staking provider | Returns staking quotes, balance, and builds stake transactions. | AppKit.stakingManager |
Swaps
A swap provider integrates a DEX or aggregator. It returns a quote for a route (input asset, output asset, amount, fees, and execution assumptions), then builds aTransactionRequest when the user accepts the quote. AppKit does not price markets itself; SwapManager coordinates the registered providers. Bundled options include Omniston and DeDust. See Swaps for the full quote-then-build flow.
Staking
A staking provider quotes a stake or unstake intent for a specific pool or protocol, then builds the matchingTransactionRequest.
Liquid-staking positions may appear in the wallet as derivative balances, such as tsTON. AppKit exposes pool metadata and APY as provider-supplied display data, not a guarantee of future yield or redemption timing.
Unstake mechanics — instant, delayed, or round-end — are provider-specific. The bundled staking provider is Tonstakers. See Staking for the full flow.
How they are registered
Provider setup uses three registration paths. API clients are bound to a network through thenetworks field of AppKitConfig. Streaming providers are also network-specific and are registered directly on appKit.streamingManager. Swap and staking providers are network-aware DeFi providers: pass them in providers at construction or register them later with registerProvider. Each DeFi provider declares its type so AppKit can route it to the correct manager.
Omniston requires its own SDK package — install it before registering the provider:
appKit.streamingManager. Omniston and DeDust are available as swap providers, and Tonstakers is available as a staking provider. Custom DeFi backends can use the same registerProvider path by implementing the swap or staking interface.
registerProvider returns void. To replace a provider, call registerProvider again with the same providerId — the registry entry is overwritten. If the previous provider owns resources you need to clean up, hold the reference and dispose of it yourself before re-registering.
Two-step transactions
Swap and staking actions follow a quote-then-build pattern.getSwapQuote and getStakingQuote return provider offers, including fees, settlement amounts, and routing data. buildSwapTransaction and buildStakeTransaction turn an accepted quote into a TransactionRequest. Building the request does not broadcast it; the request still has to be submitted with sendTransaction and approved in the connected wallet.
Custom providers
Apps that integrate their own DEX or staking backend implement the same provider interface as the bundled providers, then register the provider withregisterProvider. Provider ids are singletons; registering another provider with the same providerId replaces the previous entry.
Tips
- Provider responses are external data. Validate critical outcomes, including settlement amounts, addresses, and signatures, before changing product state.
- Quotes can expire. Build the transaction soon after fetching the quote, or refetch before showing the user a final price.
- Do not assume a provider is registered. Call
getStakingProviders(appKit)orhasStreamingProvider(appKit, network)and degrade gracefully when the list is empty or the provider is absent. - Treat provider ids as singletons. Registering a second provider with the same id replaces the previous one.