A curated collection of code snippets for developers building with SwapKit.
sdk/— snippets showing how to use the SwapKit SDK- organized by protocol (e.g.
thorchain/,maya/,chainflip/)
- organized by protocol (e.g.
api/— working with SwapKit APIs directlyai/— AI-related examples (agents, copilots, autogen integrations)misc/— utilities, helpers, or one-off demos
setup.ts— initialize SDK + connect walletmintBTCTradeAssets.ts— mint BTC trade assets withTRADE+memo
- Client
cleanerClientInit.tsx— simplified SwapKit client initialization (SDK v4)
- Config
totalConfigControl.tsx— central runtime config management (SDK v4)
- Builders
standardizedBuilders.jsx— consistent plugin & wallet builders (SDK v4)
- Imports
cleanerImports.tsx— single-package, tree-shakable import pattern (SDK v4)
- Chains
chainCoverageUpgrades.tsx— toolbox usage with Solana, XRP, Cosmos, OneKey (SDK v4)
All snippets use placeholders (YOUR_API_KEY, dummy mnemonics).
Never commit real keys or wallet secrets.