20+ Blockchains
Support for EVM chains, Bitcoin, Cosmos ecosystem, Solana, NEAR Protocol, Ripple (XRP), and more - all through one consistent interface.
SwapKit provides everything you need to integrate blockchain functionality into your application with a single, unified API.
20+ Blockchains
Support for EVM chains, Bitcoin, Cosmos ecosystem, Solana, NEAR Protocol, Ripple (XRP), and more - all through one consistent interface.
Multi-Wallet Support
Connect with 20+ wallets including MetaMask, WalletConnect, Ledger, Keystore, and hardware wallets.
DeFi Protocols
Built-in integrations with THORChain, Chainflip, 1inch, and other leading DeFi protocols.
Type-Safe & Modern
Built with TypeScript for complete type safety and excellent developer experience.
// @noErrorValidationimport { createSwapKit, Chain, SwapKitApi } from '@swapkit/sdk';
// Initialize SwapKitconst swapKit = createSwapKit();
// Connect a keystore wallet (supports 20+ chains)await swapKit.connectKeystore([Chain.Ethereum, Chain.Bitcoin, Chain.Ripple], 'your mnemonic phrase');
// Get wallet balancesconst ethBalance = await swapKit.getBalance(Chain.Ethereum);const btcBalance = await swapKit.getBalance(Chain.Bitcoin);const xrpBalance = await swapKit.getBalance(Chain.Ripple);
// Get a swap quoteconst { routes } = await SwapKitApi.getSwapQuote({ sellAsset: 'ETH.ETH', sellAmount: '1000000000000000000', // 1 ETH in wei buyAsset: 'BTC.BTC', sourceAddress: swapKit.getAddress(Chain.Ethereum), destinationAddress: swapKit.getAddress(Chain.Bitcoin), slippage: 3});
// Execute the swapif (routes.length > 0) { const txHash = await swapKit .swap({ route: routes[0] });}
Unified API
One consistent API for all chains and protocols. No need to learn different interfaces for each blockchain.
Production Ready
Battle-tested in production by THORSwap and other leading DeFi applications.
Modular Design
Use only what you need - from lightweight toolboxes to the full SDK.
Active Development
Regular updates, new chain integrations, and responsive community support.
bun add @swapkit/sdk
pnpm add @swapkit/sdk
npm install @swapkit/sdk
yarn add @swapkit/sdk
// @noErrorValidationimport { createSwapKit } from '@swapkit/sdk';
const swapKit = createSwapKit({ config: { // Optional: Add SwapKit API key for enhanced features apiKeys: { swapKit: 'your-swapkit-api-key', // Get from https://api.swapkit.dev } }});
// @noErrorValidationimport { createSwapKit, Chain, AssetValue, FeeOption } from '@swapkit/sdk';
// Initialize SwapKitconst swapKit = createSwapKit();
// Connect EVM wallet (MetaMask)await swapKit.connectEVMWallet([Chain.Ethereum]);
// Get wallet balanceconst balance = await swapKit.getBalance(Chain.Ethereum);
// Transfer ETHconst assetValue = AssetValue.from({ asset: 'ETH.ETH', value: '0.1'});
const txHash = await swapKit.transfer({ assetValue, recipient: '0x742d35Cc6634C0532925a3b844Bc9e7595f6E321', feeOptionKey: FeeOption.Fast});
Discord
Join our Discord server for support and discussions with the community.
GitHub
Contribute to SwapKit development or report issues on GitHub.