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

# RLN API 兼容性

> 查看每个 KaleidoSDK 版本对应的 RGB Lightning Node (RLN) API 版本，以及 client.rln 暴露的节点侧接口端点分类。

export const rlnApiVersion = "0.8.0";

export const sdkVersion = "0.1.17";

## 兼容性

**SDK v{sdkVersion}** 基于 **RGB Lightning Node API v{rlnApiVersion}** 生成（即 `kaleidoswap/rgb-lightning-node` 分支）。

SDK 会自动支持最新发布的 RLN API。请始终保持 SDK 与 RGB Lightning Node 同步更新，以确保完整兼容，并及时获得最新功能和安全改进。版本历史请参阅[更新日志](/cn/sdk/changelog)。

<Note>
  要查看最新的 RLN API 变更和更新内容，请参阅 [RGB Lightning Node](https://github.com/kaleidoswap/rgb-lightning-node) 或你自己的节点文档。
</Note>

## RLN API 总览

RLN（RGB Lightning Node）API 由你所配置的 RGB Lightning Node 直接提供，支持钱包操作、闪电通道管理以及节点间的交换协调。

## RLN API 分类

| 分类            | 用途             | 示例              |
| ------------- | -------------- | --------------- |
| **Wallet**    | BTC 与 RGB 资产管理 | 余额查询、转账、资产操作    |
| **Channels**  | 闪电网络通道操作       | 开通、关闭、监控、备份通道   |
| **Invoices**  | 支付请求管理         | 创建、列出并监控发票      |
| **Payments**  | 支付执行           | 支付发票、协调交换、节点间交易 |
| **Node Info** | 节点状态与配置        | 公钥、同步状态、能力信息    |

## 访问 RLN 操作

在使用 RLN 操作前，请确认已配置好节点：

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { KaleidoClient } from 'kaleido-sdk';

  const client = KaleidoClient.create({
    baseUrl: 'https://api.signet.kaleidoswap.com',
    nodeUrl: 'http://localhost:3001',  // RLN 操作必需
  });

  // 检查节点是否已配置
  if (client.hasNode()) {
    // 通过 client.rln 访问 RLN API
    const nodeInfo = await client.rln.getNodeInfo();
    const balance = await client.rln.getBtcBalance();
    const channels = await client.rln.listChannels();
  } else {
    console.log('Node not configured - RLN operations unavailable');
  }
  ```

  ```python Python theme={null}
  import asyncio
  from kaleido_sdk import KaleidoClient


  async def main():
      client = KaleidoClient.create(
          base_url="https://api.signet.kaleidoswap.com",
          node_url="http://localhost:3001"  # RLN 操作必需
      )

      # 检查节点是否已配置
      if client.has_node():
          # 通过 client.rln 访问 RLN API
          node_info = await client.rln.get_node_info()
          balance = await client.rln.get_btc_balance()
          channels = await client.rln.list_channels()
      else:
          print("Node not configured - RLN operations unavailable")


  if __name__ == "__main__":
      asyncio.run(main())
  ```
</CodeGroup>
