> ## 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.

# Node SDK FAQ

> Common questions about the Node SDK, covering language choice, the maker and RLN sub-clients, custody, networks, versioning, amounts, and browser use

## Frequently Asked Questions

> **TypeScript or Python — which should I use?**
>
> Whichever matches your stack. Both are standalone implementations that generate their types from the same [OpenAPI specifications](https://github.com/kaleidoswap/specs), so the API shape, the sub-clients, and the error hierarchy are nearly identical across the two — the few divergences (rate-limit handling, the missing-node error) are called out in [Troubleshooting](https://docs.kaleidoswap.com/cli/node-sdk/troubleshooting.md#error-reference). Every example in these docs shows both.
>
> Runtime requirements: **Node.js 18+** for TypeScript, **Python 3.11+** for Python. A Rust core is in progress.

> **What is the difference between client.maker and client.rln?**
>
> They are the two halves of a swap, and most flows use both.
>
> | Sub-client | Talks to | Covers |
> | - | - | - |
> | `client.maker` | The KaleidoSwap maker | Quotes, RFQ streaming, atomic swap init and execute, LSPS1 channel orders |
> | `client.rln` | Your own RGB Lightning Node | Wallet and RGB assets, channels, invoices, swap whitelisting |
>
> A typical atomic swap quotes and initialises through `client.maker`, whitelists the `swapstring` on `client.rln`, then executes back through `client.maker`. See [How to Swap](https://docs.kaleidoswap.com/cli/node-sdk/how-to-swap.md).

> **Do I need to run an RGB Lightning Node?**
>
> **For the atomic swap path, yes.** The taker's node is what holds the keys, whitelists the `swapstring`, and routes the HTLC. That is precisely why the maker never takes custody — there is no step where it could.
>
> You can run the node locally or point the SDK at a remote one you control. See [Node Hosting](https://docs.kaleidoswap.com/desktop-app/getting-started/node-hosting.md) for the deployment options.

> **Does the SDK hold keys or take custody?**
>
> **No.** The SDK is a typed client over two HTTP APIs. Keys live in the RGB Lightning Node you point it at, and signing happens there. Nothing in the SDK can move funds that your node has not authorised.

> **Which networks can I build against?**
>
> Signet (Mutinynet) is live today; mainnet is coming soon.
>
> * **Signet** — `https://api.signet.kaleidoswap.com`, realistic conditions, best before mainnet
>
> Pass this as `baseUrl` / `base_url`; the SDK appends `/api/v1` itself. Full list in [Available Environments](https://docs.kaleidoswap.com/cli/node-sdk/installation.md#available-environments).

> **How do I know which SDK version works with which API?**
>
> Two separate compatibility surfaces:
>
> * [Maker API Compatibility](https://docs.kaleidoswap.com/cli/node-sdk/maker-api-compatibility.md) — the SDK tracks the latest Maker API release, so there is no version pairing to manage
> * [RLN API Compatibility](https://docs.kaleidoswap.com/cli/node-sdk/rln-api-compatibility.md) — the SDK is generated against a specific RGB Lightning Node API version
>
> Both need to line up. If a call fails with an unexpected shape rather than an error, a version mismatch is the first thing to check.

> **Why are my amounts off by orders of magnitude?**
>
> The API works in **raw integer amounts**, not decimals. An asset's precision decides the conversion, and it differs per asset — BTC and USDT do not share one.
>
> Use the helpers rather than doing the arithmetic yourself:
>
> ```typescript theme={null}
> import { parseRawAmount } from 'kaleido-sdk';
>
> const sats = parseRawAmount(0.001, 8);   // 100000
> const usdt = parseRawAmount(10.50, 2);   // 1050
> ```
>
> See [Utilities](https://docs.kaleidoswap.com/cli/node-sdk/utilities.md) for the full set, including asset mapping.

> **Do I have to use WebSocket?**
>
> No. WebSocket is for **streaming live quotes** with automatic reconnection, which matters if you are showing a moving price or reacting to one. A single quote over REST is enough for a one-off swap.
>
> See [WebSocket](https://docs.kaleidoswap.com/cli/node-sdk/websocket.md) for the streaming API.

> **Can I call the SDK directly from a browser?**
>
> Not against the maker API. CORS is disabled on most endpoints, so a browser-based app needs its own backend to proxy the calls. Keep the SDK server-side and expose only what your frontend needs.

> **How should I handle errors and retries?**
>
> Every SDK exception extends `KaleidoError`, so catching that one type covers the whole hierarchy. Each error exposes `isRetryable()` / `is_retryable()`, which tells you whether retrying is safe — do not retry blindly, since some failures will never succeed on a second attempt.
>
> See [Troubleshooting](https://docs.kaleidoswap.com/cli/node-sdk/troubleshooting.md#error-reference) for the full hierarchy and the retry-with-backoff pattern, and [Best Practices](https://docs.kaleidoswap.com/cli/node-sdk/best-practices.md) for how it fits a production client.

## Get Help

Check the [Troubleshooting](https://docs.kaleidoswap.com/cli/node-sdk/troubleshooting.md) for errors rather than questions, and [Additional Resources](https://docs.kaleidoswap.com/cli/node-sdk/additional-resources.md) for upstream documentation and links.

For anything else, report a problem through your preferred channel from the options below, including:

1. SDK version (`getVersion()` / `get_version()`)
2. Language and runtime version (Node.js / Python)
3. Error message and stack trace
4. Minimal code to reproduce
5. Environment (Signet / Mainnet)

> **[Telegram Community](https://t.me/kaleidoswap)**
>
> Ask the community.

> **[GitHub Issues](https://github.com/kaleidoswap/kaleido-sdk/issues)**
>
> Report a bug on the relevant repository.

> **[Email Support](mailto:support@kaleidoswap.com)**
>
> Direct support for urgent issues.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.