> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kaleidoswap.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Overview

> Build applications on KaleidoSwap with our Python and TypeScript SDKs

## Official SDKs

KaleidoSwap provides official SDKs for both TypeScript and Python. Both are standalone implementations that auto-generate types from the same OpenAPI specifications, ensuring full type safety and consistent API design.

## Architecture

Both SDKs share the same API design and are built independently:

<img src="https://mintcdn.com/kaleidoswap/wIraRN-IMPyNpW_s/assets/images/sdk-architecture.png?fit=max&auto=format&n=wIraRN-IMPyNpW_s&q=85&s=af8429e4cc0f82d398028d500ef4a678" alt="KaleidoSwap SDK Architecture" width="2752" height="1536" data-path="assets/images/sdk-architecture.png" />

Your application connects through `KaleidoClient`, which provides two sub-clients: **MakerClient** for market operations (quotes, orders, swaps) and **RlnClient** for RGB Lightning Node operations (wallets, channels, invoices). Both use HTTP clients internally, with optional WebSocket support for real-time streaming.

### Key Benefits

* **Type Safety**: Auto-generated types from OpenAPI specs in both languages
* **Consistent API**: Identical structure across TypeScript and Python
* **Sub-client Design**: Organized access via `client.maker` and `client.rln`
* **WebSocket Support**: Real-time quote streaming with automatic reconnection

## What is KaleidoSwap?

KaleidoSwap is a decentralized exchange protocol for Bitcoin and RGB assets. It enables trading of digital assets through order-based swaps on the Lightning Network and on-chain Bitcoin transactions.

### SDK Dual Purpose

Our SDK serves two primary functions:

**Maker API Integration** (`client.maker`)

Connect to KaleidoSwap's maker APIs for:

* Getting quotes for asset pairs
* Creating and managing swap orders
* Streaming real-time quotes via WebSocket
* LSPS1 channel ordering

**RLN (RGB Lightning Node) Operations** (`client.rln`)

Direct interaction with RGB Lightning Nodes for:

* Wallet management and RGB asset operations
* Lightning channel management
* Invoice creation and payment
* Node-to-node swap coordination

## Key Features

* **Sub-client Architecture**: Organized API access via `client.maker` and `client.rln`
* **Type Safety**: Full TypeScript types and Python Pydantic models
* **WebSocket Support**: Real-time quote streaming with automatic reconnection
* **Error Handling**: Comprehensive exception hierarchy across both SDKs
* **Dual API Support**: Seamlessly work with both Maker APIs and RLN node operations
* **RGB Asset Trading**: Full support for trading RGB assets on Lightning and on-chain
* **Order-Based Swaps**: Create swap orders, pay deposits, and track execution

## Get Started

<CardGroup cols={2}>
  <Card title="Getting Started" icon="rocket" href="/sdk/getting-started">
    Install the SDK, configure your client, and make your first API call
  </Card>

  <Card title="Examples" icon="file-code" href="/sdk/examples">
    End-to-end code for market data, swaps, WebSocket streaming, and node ops
  </Card>

  <Card title="Client Reference" icon="code" href="/sdk/api-reference">
    Full method reference for MakerClient and RlnClient
  </Card>

  <Card title="Swap Protocol" icon="arrows-rotate" href="/api-reference/swap-protocol">
    Understand atomic vs. order-based swap models before integrating
  </Card>
</CardGroup>

## Support

Need help? Check out our:

* [GitHub Issues](https://github.com/kaleidoswap/kaleido-sdk/issues)
* [Community Telegram](https://t.me/kaleidoswap)
* [Support Email](mailto:support@kaleidoswap.com)
