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

> Core types and configuration objects used across the Node SDK, covering assets, trading pairs, quotes, swaps, and client config

## Overview

The SDK ships generated API models plus a thin handwritten client layer.

* TypeScript exports its request and response types from `kaleido-sdk`
* Python exports Pydantic models from `kaleido_sdk`

## Client Config

### TypeScript

```typescript theme={null}
import type { KaleidoConfig } from 'kaleido-sdk';

const config: KaleidoConfig = {
  baseUrl: 'https://api.signet.kaleidoswap.com',
  nodeUrl: 'http://localhost:3001',
  apiKey: process.env.KALEIDO_API_KEY,
  timeout: 30,
  logLevel: 'info',
  logger: console,
};
```

`KaleidoConfig` currently supports:

* `baseUrl?`
* `nodeUrl?`
* `apiKey?`
* `nodeApiKey?`
* `timeout?`
* `logLevel?`
* `logger?`

### Python

Python does not expose a separate constructor object for normal use. Configure the client via `KaleidoClient.create(...)`:

```python theme={null}
import logging
from kaleido_sdk import KaleidoClient

client = KaleidoClient.create(
    base_url="https://api.signet.kaleidoswap.com",
    node_url="http://localhost:3001",
    api_key=None,
    timeout=30.0,
    max_retries=3,
    cache_ttl=60,
    log_level=logging.INFO,
)
```

## Common Enums and Models

```typescript TypeScript theme={null}
import type {
  AssetResponseModel,
  PairQuoteRequest,
  PairQuoteResponse,
  TradingPairResponseModel,
} from 'kaleido-sdk';
import { Layer } from 'kaleido-sdk';
```

```python Python theme={null}
from kaleido_sdk import (
    AssetResponseModel,
    Layer,
    PairQuoteRequest,
    PairQuoteResponse,
    TradingPairResponseModel,
)
```

## Layers

The SDK uses the shared `Layer` enum for routing assets across supported networks.

```typescript TypeScript theme={null}
import { Layer } from 'kaleido-sdk';

const fromLayer = Layer.BTC_LN;
const toLayer = Layer.RGB_LN;
```

```python Python theme={null}
from kaleido_sdk import Layer

from_layer = Layer.BTC_LN
to_layer = Layer.RGB_LN
```

## Quote Models

```typescript TypeScript theme={null}
import type { PairQuoteRequest, PairQuoteResponse } from 'kaleido-sdk';

const request: PairQuoteRequest = {
  from_asset: { asset_id: 'BTC', layer: Layer.BTC_LN, amount: 100000 },
  to_asset: { asset_id: 'USDT', layer: Layer.RGB_LN },
};

const response: PairQuoteResponse = await client.maker.getQuote(request);
```

```python Python theme={null}
from kaleido_sdk import Layer, PairQuoteRequest, SwapLegInput

request = PairQuoteRequest(
    from_asset=SwapLegInput(asset_id="BTC", layer=Layer.BTC_LN, amount=100000),
    to_asset=SwapLegInput(asset_id="USDT", layer=Layer.RGB_LN),
)

response = await client.maker.get_quote(request)
```

## Utility Types

TypeScript also exports WebSocket and logging-related types from the package root:

```typescript theme={null}
import type { QuoteResponse, LogLevelValue, SdkLogger } from 'kaleido-sdk';
```


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