THORSwap SwapKit
Ask or search…
⌃K
Links
Comment on page

@swapkit/sdk

All-in-one SwapKit SDK package. It contains all wallets, core, api & types installed & exported.

Installation

pnpm
yarn
npm
pnpm add @swapkit/sdk
yarn add @swapkit/sdk
npm add @swapkit/sdk

Usage

​
import { createSwapKit, Chain, ConnectConfig, ApisType } from '@swapkit/sdk'
​
const config: {
apis?: ApisType;
excludedChains?: Chain[];
config?: ConnectConfig;
rpcUrls?: { [key in Chain]?: string }
} = {}
​
const skClient = createSwapKit(config)
​
await skClient.connectLedger(Chain.BTC)
​
const txHash = await skClient.swap(...)