Skip to content
SwapKit is a powerful suite of tools for building blockchain applications.

What's New in SwapKit v4

SwapKit v4 brings significant improvements to developer experience, runtime flexibility, and overall architecture. Here’s everything new and exciting in this major release.

Runtime Configuration Updates

Game Changer

Update API keys, RPC URLs, and settings without recreating the SwapKit client. Perfect for production environments and dynamic configuration management.

import { SKConfig } from '@swapkit/sdk';
SKConfig.setRpcUrl(Chain.Ethereum, "https:
SKConfig.setApiKey("swapKit", "new-api-key");

Learn more →

Monolithic Package Structure

Breaking Change

Simplified package management with consolidated packages for better maintainability and smaller bundle sizes when using the full SDK.

import { createSwapKit, Chain } from '@swapkit/sdk';
import { ThorchainPlugin } from '@swapkit/plugins/thorchain';

Migration guide →

Enhanced Chain Support

New

Improved support for Solana with Jupiter API integration, dynamic Cosmos fees, full Ripple support, and OneKey wallet integration.

  • Solana: Real-time token metadata via Jupiter API
  • Cosmos: Automatic fee estimation
  • Ripple: Complete XRP toolbox implementation
  • OneKey: New wallet integration

Standardized Creation Helpers

Developer Experience

New createPlugin and createWallet helpers provide consistent interfaces for extending SwapKit functionality.

import { createPlugin } from '@swapkit/plugins';
export const MyPlugin = createPlugin({
name: "myPlugin",
methods: ({ getWallet }) => ({ customMethod })
});
  • Individual packages consolidated into monolithic packages with submodule exports
  • All imports must be updated to new paths
  • See complete migration guide for details
  • Introduced centralized SKConfig system
  • Removed direct API/RPC parameters from constructors
  • Runtime configuration updates now possible
  • New createPlugin and createWallet helpers required
  • Simplified parameter interfaces
  • Better type safety and consistency

Efficient Configuration Management

No more client recreation for configuration changes. Update settings on-the-fly without losing wallet connections or cached data.

Better Bundle Size Control

Use only what you need with the new modular structure. Import specific plugins and wallets for smaller production bundles.

Optimized Chain Operations

Improved toolbox initialization and better caching for frequently accessed chain operations.

// @noErrorValidation
const client = SwapKit({
apis: { [Chain.Ethereum]: customApi },
rpcUrls: { [Chain.Ethereum]: "https:
config: { stagenet: false },
plugins: { ...ThorchainPlugin },
wallets: { ...keystoreWallet }
});
const client = createSwapKit({
config: {
rpcUrls: { [Chain.Ethereum]: "https:
apiKeys: { blockchair: "your-key" }
},
plugins: { ...ThorchainPlugin },
wallets: { ...keystoreWallet }
});
// @noErrorValidation
SKConfig.setEnv("isStagenet", true);
SKConfig.setRpcUrl(Chain.THORChain, "https:
const balance = await swapKit.getBalance(Chain.THORChain);

Improved error messages with more context and better debugging information for faster issue resolution.

  • Jupiter API Integration: Real-time token metadata and routing
  • Improved Transaction Handling: Better fee estimation and confirmation
  • Phantom Wallet: Enhanced support with latest features
  • Full XRP Toolbox: Complete implementation for XRP Ledger operations
  • Destination Tags: Proper handling of XRP memos and destination tags
  • Enhanced Validation: Better address and transaction validation
  • Multi-Chain Support: Hardware wallet support across all supported chains
  • Secure Operations: Hardware-level security for sensitive operations
  • User-Friendly Interface: Streamlined connection and transaction flow
  • Auto Fee Estimation: Automatic fee calculation when not provided
  • Better Gas Management: Improved gas estimation across Cosmos chains
  • Enhanced IBC Support: Better Inter-Blockchain Communication handling
// @noErrorValidation
SKConfig.setApiKey("swapKit", "premium-key");
SKConfig.setApiKey("blockchair", "enterprise-key");
SKConfig.setRpcUrl(Chain.Ethereum, "https:
SKConfig.setRpcUrl(Chain.Arbitrum, "https:
// @noErrorValidation
SKConfig.set({
rpcUrls: {
[Chain.Ethereum]: "https:
[Chain.Arbitrum]: "https:
},
apiKeys: {
blockchair: "enterprise-key",
swapKit: "premium-key"
},
envs: {
isStagenet: false,
isDev: false
}
});
// @noErrorValidation
SKConfig.set({
envs: { isDev: false, isStagenet: false },
apiKeys: {
swapKit: process.env.SWAPKIT_PROD_KEY,
blockchair: process.env.BLOCKCHAIR_PROD_KEY,
},
});
SKConfig.set({
envs: { isDev: true, isStagenet: true },
apiKeys: {
swapKit: process.env.SWAPKIT_DEV_KEY,
blockchair: process.env.BLOCKCHAIR_DEV_KEY,
},
});

Ready to upgrade? Follow our comprehensive migration guide:

  1. Review Breaking Changes - Understand what’s changed
  2. Update Dependencies - Install v4 packages
  3. Update Imports - Fix import paths
  4. Refactor Configuration - Use SKConfig system
  5. Test Integration - Verify everything works

Migration Help

Need help migrating? Our community is here to help with specific migration challenges. [Get Migration Support →](https:

Bug Reports

Found an issue in v4? Report it on GitHub with detailed reproduction steps. [Report Issues →](https:

Feature Requests

Have ideas for v4 improvements? We’d love to hear your feedback and suggestions. [Share Ideas →](https:


Ready to get started with v4? Head over to our Getting Started guide to build your first v4 application, or check out the Migration guide if you’re upgrading from v3.