Documentation Index
Fetch the complete documentation index at: https://docs.leokit.dev/llms.txt
Use this file to discover all available pages before exploring further.
Install
ethers@^6 is a peer dependency. Optional dependencies (per-chain xchain libraries, ZCash, Solana, etc.) are loaded lazily — only what you actually use is bundled.
The package exposes five entry points:
| Import path | Use |
|---|---|
leokit-sdk | LeoKitClient, factory, top-level types |
leokit-sdk/wallets | WalletManager and adapter classes (lazy-loaded) |
leokit-sdk/protocols | Protocol handlers (EvmProtocol, NearProtocol, etc.) |
leokit-sdk/utils | Amount/chain/asset/error helpers, EventEmitter |
leokit-sdk/cdn | Icon-URL builders |
Create a Client
LeoKitConfig
| Field | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | API key from dash.leokit.dev |
network | "mainnet" | "testnet" | No | Default: "mainnet" |
apiUrl | string | No | Default: https://api.leokit.dev |
cdnUrl | string | No | CDN base for icons. Default: LeoKit CDN |
sdk.getConfig() returns the resolved ResolvedConfig (defaults filled in). sdk.getNetwork() returns the active Network.
End-to-End Swap
Where to Go Next
Wallets
19 adapters: MetaMask, Phantom, Ledger, Keplr, Trust, WalletConnect…
Quotes & Swaps
getQuote, streamQuote, executeSwap, transfer, transaction trackingLimit Orders
THORChain / MAYAChain native limit orders
Shielded ZCash
WebZjs-backed shielded balance scan and transferUtilities
Amount math, chain helpers, asset parsing, error handling, events, icons
Source
- npm:
leokit-sdk - GitHub:
LeoFinance/leokit-sdk
README.md with a long-form integration walkthrough and a React example.