kaleidoswap-sdk
v0.5.5
Published
Kaleidoswap SDK for TypeScript and JavaScript - trade RGB assets on Lightning Network
Maintainers
Readme
Kaleidoswap SDK — TypeScript / JavaScript
TypeScript SDK for trading RGB assets on the Lightning Network via the Kaleidoswap protocol.
Installation
pnpm add kaleidoswap-sdk
# or: npm install kaleidoswap-sdkQuick Start
The SDK exposes two sub-clients depending on what you need:
| Sub-client | Config key | What it does |
|---|---|---|
| client.maker | baseUrl | Kaleidoswap market API — assets, quotes, swap orders, LSP |
| client.rln | nodeUrl | Your RGB Lightning Node — wallet, channels, payments, RGB assets |
import { KaleidoClient } from 'kaleidoswap-sdk';
// Zero-config — defaults to regtest
const client = KaleidoClient.create();
const assets = await client.maker.listAssets();
// Maker API only
const client = KaleidoClient.create({
baseUrl: 'https://api.kaleidoswap.com',
});
const assets = await client.maker.listAssets();
// Node only (baseUrl still defaults to regtest)
const client = KaleidoClient.create({
nodeUrl: 'http://localhost:3001',
});
const info = await client.rln.getNodeInfo();
// Both together
const client = KaleidoClient.create({
baseUrl: 'https://api.kaleidoswap.com',
nodeUrl: 'http://localhost:3001',
});
const pairs = await client.maker.listPairs();
const channels = await client.rln.listChannels();Documentation
Full usage guide, API reference, and examples at https://docs.kaleidoswap.com/sdk/introduction
License
MIT
