Skip to main content
kaleido-sdk (TypeScript) and kaleido_sdk (Python) are generated from the same Maker API and RGB Lightning Node specs, then wrapped with handwritten clients:
  • client.maker for KaleidoSwap market, swap, and LSPS1 endpoints
  • client.rln for RGB Lightning Node wallet, channel, payment, and swap endpoints
For which SDK version works with which API, see Maker API Compatibility and RLN API Compatibility.

Installation

Requirements

  • Node.js 18 or higher
  • TypeScript 5.x recommended

Basic Setup

KaleidoClient.create() is synchronous in both SDKs. Do not await client creation.

Configuration

TypeScript

KaleidoClient.create() accepts a KaleidoConfig object:
Supported config fields:
  • baseUrl?: Maker API base URL. Defaults to https://api.signet.kaleidoswap.com
  • nodeUrl?: RGB Lightning Node URL
  • apiKey?: optional API key
  • nodeApiKey?: optional bearer token for authenticated RLN node requests
  • timeout?: request timeout in seconds
  • logLevel?: SDK log level
  • logger?: custom logger implementation

Python

KaleidoClient.create() accepts keyword arguments:
Python supports the same connection settings plus:
  • max_retries: retry budget for the HTTP client
  • cache_ttl: cache TTL in seconds
  • log_level: standard Python logging level

Environment Variables

The SDK does not auto-load environment variables, but these names are used by the examples and work well as a convention:

Available Environments

Pass the API URL as baseUrl / base_url; the SDK appends the /api/v1 path itself. No API key is required on the test networks.

Sub-Client Architecture

Node Configuration Checks

TypeScript exposes client.hasNode() and always returns an rln client instance. Python exposes client.has_node(), and client.rln raises NodeNotConfiguredError if node_url is missing.

First Quote