@kaleidorg/mind 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/bitrefill/contract.d.ts +60 -0
  2. package/dist/bitrefill/contract.d.ts.map +1 -0
  3. package/dist/bitrefill/contract.js +119 -0
  4. package/dist/bitrefill/contract.js.map +1 -0
  5. package/dist/context/compress.d.ts +65 -0
  6. package/dist/context/compress.d.ts.map +1 -0
  7. package/dist/context/compress.js +181 -0
  8. package/dist/context/compress.js.map +1 -0
  9. package/dist/engine.d.ts +20 -0
  10. package/dist/engine.d.ts.map +1 -1
  11. package/dist/engine.js +23 -4
  12. package/dist/engine.js.map +1 -1
  13. package/dist/evidence.d.ts +62 -0
  14. package/dist/evidence.d.ts.map +1 -0
  15. package/dist/evidence.js +47 -0
  16. package/dist/evidence.js.map +1 -0
  17. package/dist/flashnet/contract.d.ts +56 -0
  18. package/dist/flashnet/contract.d.ts.map +1 -0
  19. package/dist/flashnet/contract.js +100 -0
  20. package/dist/flashnet/contract.js.map +1 -0
  21. package/dist/funnel.d.ts +11 -0
  22. package/dist/funnel.d.ts.map +1 -1
  23. package/dist/funnel.js +50 -7
  24. package/dist/funnel.js.map +1 -1
  25. package/dist/index.d.ts +10 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +7 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/kaleidoswap/contract.js +1 -1
  30. package/dist/kaleidoswap/contract.js.map +1 -1
  31. package/dist/knowledge/bitcoin-copilot.d.ts.map +1 -1
  32. package/dist/knowledge/bitcoin-copilot.js +83 -0
  33. package/dist/knowledge/bitcoin-copilot.js.map +1 -1
  34. package/dist/providers/types.d.ts +17 -0
  35. package/dist/providers/types.d.ts.map +1 -1
  36. package/dist/qvac/provider.d.ts.map +1 -1
  37. package/dist/qvac/provider.js +23 -0
  38. package/dist/qvac/provider.js.map +1 -1
  39. package/dist/qvac/stream.d.ts +6 -0
  40. package/dist/qvac/stream.d.ts.map +1 -1
  41. package/dist/qvac/stream.js +12 -0
  42. package/dist/qvac/stream.js.map +1 -1
  43. package/dist/recipe/flashnet-swap.d.ts +35 -0
  44. package/dist/recipe/flashnet-swap.d.ts.map +1 -0
  45. package/dist/recipe/flashnet-swap.js +239 -0
  46. package/dist/recipe/flashnet-swap.js.map +1 -0
  47. package/dist/recipe/kaleidoswap-atomic.d.ts.map +1 -1
  48. package/dist/recipe/kaleidoswap-atomic.js +37 -16
  49. package/dist/recipe/kaleidoswap-atomic.js.map +1 -1
  50. package/dist/recipe/kaleidoswap-channel-order.d.ts.map +1 -1
  51. package/dist/recipe/kaleidoswap-channel-order.js +31 -10
  52. package/dist/recipe/kaleidoswap-channel-order.js.map +1 -1
  53. package/dist/recipe/kaleidoswap-price.d.ts.map +1 -1
  54. package/dist/recipe/kaleidoswap-price.js +7 -1
  55. package/dist/recipe/kaleidoswap-price.js.map +1 -1
  56. package/dist/recipe/runner.d.ts.map +1 -1
  57. package/dist/recipe/runner.js +5 -3
  58. package/dist/recipe/runner.js.map +1 -1
  59. package/dist/recipe/swap.d.ts.map +1 -1
  60. package/dist/recipe/swap.js +14 -1
  61. package/dist/recipe/swap.js.map +1 -1
  62. package/dist/wallet/confirm.d.ts.map +1 -1
  63. package/dist/wallet/confirm.js +1 -0
  64. package/dist/wallet/confirm.js.map +1 -1
  65. package/dist/wallet/contract.d.ts.map +1 -1
  66. package/dist/wallet/contract.js +20 -4
  67. package/dist/wallet/contract.js.map +1 -1
  68. package/package.json +4 -4
  69. package/skills/bitrefill/SKILL.md +152 -52
  70. package/skills/flashnet-swaps/SKILL.md +158 -0
  71. package/skills/kaleido-lsps/SKILL.md +25 -8
  72. package/skills/kaleido-trading/SKILL.md +36 -12
  73. package/skills/merchant-finder/SKILL.md +1 -1
  74. package/skills/rgb-lightning-node/SKILL.md +35 -8
  75. package/skills/spark-wallet/SKILL.md +235 -0
  76. package/skills/wallet-assistant/SKILL.md +2 -2
  77. package/src/bitrefill/contract.test.ts +89 -0
  78. package/src/bitrefill/contract.ts +190 -0
  79. package/src/context/compress.test.ts +120 -0
  80. package/src/context/compress.ts +230 -0
  81. package/src/engine.test.ts +34 -0
  82. package/src/engine.ts +35 -4
  83. package/src/evidence.test.ts +80 -0
  84. package/src/evidence.ts +114 -0
  85. package/src/flashnet/contract.test.ts +101 -0
  86. package/src/flashnet/contract.ts +164 -0
  87. package/src/funnel.ts +59 -8
  88. package/src/index.ts +51 -1
  89. package/src/kaleidoswap/contract.ts +1 -1
  90. package/src/knowledge/bitcoin-copilot.ts +94 -0
  91. package/src/providers/types.ts +18 -0
  92. package/src/qvac/provider.ts +25 -1
  93. package/src/qvac/stream.test.ts +11 -0
  94. package/src/qvac/stream.ts +16 -0
  95. package/src/recipe/flashnet-swap.test.ts +114 -0
  96. package/src/recipe/flashnet-swap.ts +266 -0
  97. package/src/recipe/kaleidoswap-atomic.test.ts +21 -0
  98. package/src/recipe/kaleidoswap-atomic.ts +34 -16
  99. package/src/recipe/kaleidoswap-channel-order.test.ts +38 -0
  100. package/src/recipe/kaleidoswap-channel-order.ts +27 -9
  101. package/src/recipe/kaleidoswap-price.ts +7 -1
  102. package/src/recipe/recipe.test.ts +5 -0
  103. package/src/recipe/runner.ts +5 -3
  104. package/src/recipe/swap.ts +16 -1
  105. package/src/wallet/confirm.test.ts +8 -0
  106. package/src/wallet/confirm.ts +1 -0
  107. package/src/wallet/contract.test.ts +10 -0
  108. package/src/wallet/contract.ts +26 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaleidorg/mind",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Local-first reasoning + function-calling engine for KaleidoSwap. QVAC-powered.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -66,8 +66,8 @@
66
66
  }
67
67
  },
68
68
  "devDependencies": {
69
- "@qvac/sdk": "^0.13.1",
70
- "@types/node": "^20.0.0",
71
- "vitest": "^1.6.0"
69
+ "@qvac/sdk": "^0.13.5",
70
+ "@types/node": "^20.19.43",
71
+ "vitest": "^1.6.1"
72
72
  }
73
73
  }
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  name: bitrefill
3
- description: "Buy or browse Bitrefill — 1,500+ gift cards, mobile top-ups, and eSIMs across 180+ countries, payable in crypto, Lightning, USDC via x402, or pre-funded account balance. Routes the host agent to its highest-fidelity channel (residential browser, MCP server, npm CLI, or REST API) based on detected runtime capabilities, with a dedicated OpenClaw integration guide for chat-channel scenarios. Triggers when the user mentions Bitrefill, gift cards, mobile top-up, eSIM data plan, refilling a phone, or asks to pay or check out with crypto, Lightning, USDC, or x402."
4
- compatibility: "Detects host capabilities at runtime. Paths require: browse — residential-IP browser; MCP — MCP-capable client + Bitrefill OAuth/API key; CLI — Node.js >=18 + shell + npm + @bitrefill/cli >=0.3.0 (headless login/verify via magic link); API — outbound HTTP + Bitrefill API key (Personal) or API ID/Secret (Business/Affiliate). OpenClaw host gets a dedicated guide."
3
+ description: "Buy or browse Bitrefill — 1,500+ gift cards, mobile top-ups, and eSIMs across 180+ countries, payable in crypto, Lightning, USDC via x402, or pre-funded account balance. Use these tools to actually transact: bitrefill_search bitrefill_get_product bitrefill_create_invoice (spend, confirmed) bitrefill_get_invoice/bitrefill_get_order for the redemption code."
4
+ tools: bitrefill_search, bitrefill_get_product, bitrefill_get_balance, bitrefill_create_invoice, bitrefill_get_invoice, bitrefill_get_order, spark_pay_invoice, spark_get_balance, rln_pay_invoice
5
+ triggers: bitrefill, gift card, gift cards, giftcard, voucher, vouchers, top-up, topup, top up, refill, esim, e-sim, mobile plan, mobile top-up, prepaid, amazon, steam, google play, app store, itunes, playstation, xbox, netflix, spotify, uber
6
+ compatibility: "Live REST adapter on the CLI/desktop when BITREFILL_API_KEY (Personal) or BITREFILL_API_ID + BITREFILL_API_SECRET (Business) are set. Without those env vars the tools aren't registered — tell the user and stop."
5
7
  metadata:
6
8
  author: bitrefill
7
- version: "2.1.5"
9
+ version: "3.0.0"
8
10
  homepage: "https://www.bitrefill.com"
9
11
  docs: "https://docs.bitrefill.com"
10
12
  repository: "https://github.com/bitrefill/cli"
@@ -12,55 +14,153 @@ metadata:
12
14
 
13
15
  # Bitrefill
14
16
 
15
- Bitrefill sells digital goods (gift cards, mobile top-ups, eSIMs) across 180+ countries and 1,500+ brands. Pay with crypto, Lightning, USDC via x402, or pre-funded account balance. Codes deliver instantly after payment confirms.
16
-
17
- This skill **routes by capability, not by use case**. Same intent ("buy a Steam card") plays out differently across hosts. Pick a path below based on what your runtime can do.
18
-
19
- ## Pick a path
20
-
21
- Walk these checks **in order**. First match wins.
22
-
23
- 1. **Inside OpenClaw?** Check for `~/.openclaw/openclaw.json`, `~/.openclaw/skills/`, or `openclaw` on PATH. If yes → read [host-openclaw.md](references/host-openclaw.md) first. **Default purchase path: guest CLI via `exec`** (no auth). Sign in for `balance`/cashback. OpenClaw also supports MCP, API, Browse, chat-channel scenarios (Telegram, cron, mobile camera).
24
-
25
- 2. **Browse-only intent (no purchase)?** If the user only wants to explore, compare prices, or learn how products work:
26
- - Have a residential-IP browser (ChatGPT Atlas, Cursor browser tool, Claude/Playwright Chrome extension, OpenClaw on user host)? → [browse.md](references/browse.md).
27
- - Datacenter egress only (ChatGPT web/Agent, Gemini consumer, Jules)? `www.bitrefill.com` returns **403 Cloudflare** to datacenter IPs. Use [mcp.md](references/mcp.md) `search-products` / `product-details` insteadthey return the same catalog without scraping.
28
-
29
- 3. **MCP supported?** Bitrefill ships a remote HTTP/SSE MCP at `https://api.bitrefill.com/mcp`. Works on Claude.ai (Pro+), Cowork, Claude Desktop, Claude Code, ChatGPT (Plus+), Atlas, Codex CLI, Gemini CLI, Cursor, OpenCode, OpenClaw. **Highest-fidelity purchase channel — typed tool calls, OAuth or API key, no shell needed.** → [mcp.md](references/mcp.md).
30
-
31
- 4. **Shell + `npm install` available?** CLI ≥ 0.3.0: **guest checkout first** (no auth — `buy-products --email` + crypto). Sign in for `balance`, cashback, order history. [cli.md](references/cli.md). Headless sign-in → [cli-headless-auth.md](references/cli-headless-auth.md).
32
-
33
- 5. **Outbound HTTP from agent loop?** Anywhere shell exists, plus Claude Code `WebFetch`. Last resort — verbose, no typed validation. → [api.md](references/api.md).
34
-
35
- 6. **None of the above** (e.g. Gemini consumer free tier): give the user a `bitrefill.com` link and stop.
36
-
37
- Don't know which host you're in? Read [capability-matrix.md](references/capability-matrix.md) per-client cheat sheet maps every leading agent product to its viable paths.
38
-
39
- ## Top spending safeguards (read full list before any purchase)
40
-
41
- This skill enables **real-money transactions**. Codes deliver instantly and digital goods are non-refundable per EU consumer rights.
42
-
43
- - **Confirm before buying.** Present product, denomination, price, payment method. Wait for explicit user approval. Autonomous purchasing only when user opts in for the current session.
44
- - **Treat codes as cash.** Never paste in group chats or public channels. Prefer in-memory storage over plain-text logs. Advise user to redeem ASAP.
45
- - **Use a dedicated, low-balance account.** Never give the agent access to high-balance accounts or crypto wallet seeds. This skill is **not a wallet**.
46
- - **Log every purchase.** `invoice_id`, product, amount, payment method.
47
-
48
- Full safeguards + per-host hardening (OpenClaw exec-approvals, Cursor auto-approve, Codex sandbox, Claude Code allowlist) → [safeguards.md](references/safeguards.md).
49
-
50
- ## References
51
-
52
- | File | Use when |
53
- |------|----------|
54
- | [browse.md](references/browse.md) | Agent has residential-IP browser; user wants to explore |
55
- | [mcp.md](references/mcp.md) | MCP-capable host; preferred purchase path |
56
- | [cli.md](references/cli.md) | Shell + npm; guest checkout or signed-in CLI ≥ 0.3.0 |
57
- | [cli-headless-auth.md](references/cli-headless-auth.md) | AgentMail or equivalent inbox + magic-link auth for headless agents |
58
- | [api.md](references/api.md) | HTTP-only runtime; Personal / Business / Affiliate REST tiers |
59
- | [host-openclaw.md](references/host-openclaw.md) | OpenClaw Gateway guest CLI via `exec` preferred |
60
- | [capability-matrix.md](references/capability-matrix.md) | Per-client viable paths cheat sheet |
61
- | [safeguards.md](references/safeguards.md) | Spending policy + per-host hardening |
62
- | [troubleshooting.md](references/troubleshooting.md) | Common errors across all paths |
17
+ Bitrefill sells digital goods (gift cards, mobile top-ups, eSIMs) across 180+
18
+ countries. Codes deliver instantly after the invoice settles.
19
+
20
+ This skill is **action-shaped**: when the host has the `bitrefill_*` tools
21
+ wired, you transact through them directly. Don't navigate browser / MCP / CLI
22
+ fallbacks unless the tools are absent.
23
+
24
+ ## Critical rules (read first)
25
+
26
+ 1. **Never invent product or package ids.** Every `product_id` and
27
+ `package_id` MUST come from a `bitrefill_search` + `bitrefill_get_product`
28
+ result in the current turn.
29
+ 2. **Confirm before spending.** `bitrefill_create_invoice` is the spendit
30
+ is automatically confirmation-gated by the host. Before calling it, show
31
+ the user product, denomination, total price, and payment method in plain
32
+ English, then call the tool. The host will fire one confirmation; on
33
+ approve, the invoice is created.
34
+ 3. **Codes are cash.** When you read `redemption_info.code` from
35
+ `bitrefill_get_order`, return it once, advise the user to store it
36
+ securely, and **never** repeat it in summaries or future turns.
37
+ 4. **No tools wired = no purchase.** If `bitrefill_search` isn't available
38
+ in this session (no API key configured), say so directly: *"Bitrefill
39
+ purchases need a `BITREFILL_API_KEY` env var. Set one and restart, or
40
+ browse <https://www.bitrefill.com> directly."* Don't fall back to
41
+ inventing products.
42
+
43
+ ## Happy-path playbook
44
+
45
+ For a typical buy ("a $25 Amazon US gift card with my balance"):
46
+
47
+ 1. **`bitrefill_search({ query, country? })`** find candidate products.
48
+ - "amazon" `{ query: "amazon", country: "US" }` if the user named a
49
+ country, else just `{ query: "amazon" }`.
50
+ - Returns a list of `{ id, name, country, category }` rows. Pick the one
51
+ that matches the user's intent. If multiple plausible matches, ask the
52
+ user once instead of guessing.
53
+
54
+ 2. **`bitrefill_get_product({ product_id })`** read the `packages` array
55
+ for the right denomination. Each package has `{ id, value, price,
56
+ currency }`. **The `package_id` is what you pass to create_invoice**, NOT
57
+ the bare `value`.
58
+
59
+ 3. **`bitrefill_get_balance()`** *(optional)* when the user said "with my
60
+ balance" or asked "can I afford it", verify the account has enough
61
+ before creating the invoice. Skip when paying with Lightning / on-chain.
62
+
63
+ 4. **`bitrefill_create_invoice({ products, payment_method, ... })`**
64
+ confirmation-gated spend. Choose `payment_method` per the user's request:
65
+ - `"balance"` + `auto_pay: true` — instant settlement from account
66
+ balance. **Default** when the user says "with my balance" or doesn't
67
+ specify and balance is sufficient.
68
+ - `"lightning"` — fastest crypto path. Response carries a BOLT11
69
+ invoice the user pays out-of-band (see step 5b — Spark, if connected,
70
+ pays it directly). **Requires `refund_address`** in case it expires.
71
+ - `"bitcoin"`, `"usdc_base"`, `"usdc_polygon"`, `"usdt_tron"`,
72
+ `"usdt_ethereum"` — same pattern, slower confirmation; also need
73
+ `refund_address`.
74
+
75
+ Line items: `products: [{ product_id, package_id, quantity }]`. Up to 20
76
+ per invoice.
77
+
78
+ 5. **Settlement.**
79
+
80
+ a. **`balance` + `auto_pay:true`** — the invoice is usually `complete`
81
+ on creation. Read its `order_id`(s) and skip to step 6.
82
+
83
+ b. **`lightning` with Spark connected** — the response includes a BOLT11
84
+ invoice (commonly under `payment.lightning_invoice`, surface whatever
85
+ field the host returns). Pay it with **`spark_pay_invoice({ invoice:
86
+ <bolt11> })`** — that's one extra confirmation gate, and Spark settles
87
+ it in seconds. (Same pattern if RLN is the user's Lightning layer:
88
+ use `rln_pay_invoice`.) Then `bitrefill_get_invoice` should already
89
+ report `paid` / `complete`.
90
+
91
+ c. **`lightning` or on-chain without an on-device wallet** — relay the
92
+ payment URI to the user and **poll** `bitrefill_get_invoice({
93
+ invoice_id })` until `status:"complete"`. Don't poll faster than
94
+ every ~5s; give up after a few minutes and hand the invoice id back
95
+ to the user to check later.
96
+
97
+ 6. **`bitrefill_get_order({ order_id })`** — read `redemption_info`:
98
+ - `.code` — the gift-card code or top-up PIN. The actual product.
99
+ - `.pin` — additional PIN for prepaid cards (often present alongside
100
+ the code).
101
+ - `.link` — brand redemption URL when applicable.
102
+ - `.instructions` — brand-specific redemption steps.
103
+
104
+ Present the code in the chat ONCE, then tell the user to store it and
105
+ redeem ASAP. Don't echo it in subsequent replies, summaries, or memory.
106
+
107
+ ## Choosing a payment method
108
+
109
+ | Method | Speed | Blast radius | Use when |
110
+ |---|---|---|---|
111
+ | `balance` + `auto_pay:true` | Instant | Capped at account balance | Default. User pre-funded the account; lowest risk. |
112
+ | `lightning` | Seconds | Whatever's in the user's LN wallet | User asks for "pay with Lightning" or wants no pre-funding. |
113
+ | `bitcoin` | 10–60 min | One on-chain UTXO | User asks for "pay on-chain" or invoice > Lightning capacity. |
114
+ | `usdc_base` (x402) | Seconds | Agent USDC wallet balance | Agent has an x402-capable USDC wallet. |
115
+ | Other on-chain (USDT/USDC variants) | Variable | One UTXO per network | User explicitly requested. |
116
+
117
+ Default to `balance` when available; ask the user before switching to a
118
+ crypto method.
119
+
120
+ ## Failure handling
121
+
122
+ Tool errors surface as thrown messages like `"bitrefill bitrefill_create_invoice failed: HTTP 401 ..."`. Relay them as plain English:
123
+
124
+ - **401 Unauthorized** — `BITREFILL_API_KEY` is unset or wrong. Tell the
125
+ user; don't retry.
126
+ - **400 / validation errors** — usually a bad `package_id` or
127
+ `payment_method`. Re-read the product's `packages` array and retry once,
128
+ then stop and ask.
129
+ - **402 Payment Required** (with `balance`) — account underfunded. Show
130
+ the deficit; suggest topping up or switching payment method.
131
+ - **Invoice `expired`** — re-create the invoice; an old quote isn't
132
+ reusable.
133
+
134
+ ## Reply style
135
+
136
+ - Show the candidate product list as a short bulleted list (≤5 rows).
137
+ - Before the spend, summarize in one line:
138
+ `Buying: 1× Amazon US $25 — total $25.00 USD, paying with balance. Confirm?`
139
+ - After settlement: one line on success, then the redemption details on a
140
+ separate line so the user can copy the code.
141
+ - After delivering the code, suggest redeeming ASAP and do NOT repeat the
142
+ code in later turns.
143
+
144
+ ## References (deep-dive, on demand)
145
+
146
+ The references below cover paths and host hardening — they're for hosts
147
+ that **don't** have the `bitrefill_*` tools wired (browser-only,
148
+ MCP-capable client, npm CLI, raw REST). When the tools above are
149
+ available, you don't need to read them.
150
+
151
+ | File | When |
152
+ |------|------|
153
+ | [api.md](references/api.md) | Mapping the contract tools back to raw REST endpoints. |
154
+ | [mcp.md](references/mcp.md) | Host has the Bitrefill remote MCP wired instead of the contract. |
155
+ | [cli.md](references/cli.md) | `@bitrefill/cli` npm path (auth-bound). |
156
+ | [cli-headless-auth.md](references/cli-headless-auth.md) | Magic-link auth via an agent inbox. |
157
+ | [browse.md](references/browse.md) | Browser-only hosts. |
158
+ | [host-openclaw.md](references/host-openclaw.md) | OpenClaw-specific path. |
159
+ | [capability-matrix.md](references/capability-matrix.md) | Per-client cheat sheet. |
160
+ | [safeguards.md](references/safeguards.md) | Spending policy + per-host hardening. |
161
+ | [troubleshooting.md](references/troubleshooting.md) | Common errors. |
63
162
 
64
163
  ## Source of truth
65
164
 
66
- Skill summarizes and routes. For exhaustive enums (countries, payment methods, full endpoint list), follow link-outs to <https://docs.bitrefill.com>.
165
+ Skill describes the contract + playbook. For exhaustive enums (countries,
166
+ payment methods, full endpoint list), see <https://docs.bitrefill.com>.
@@ -0,0 +1,158 @@
1
+ ---
2
+ name: flashnet-swaps
3
+ description: "Swap between BTC and Spark tokens (e.g. USDB) using Flashnet — a Spark-native AMM. Run by quoting `flashnet_simulate_swap` first, then `flashnet_execute_swap` on confirmation. Pairs with the spark-wallet skill: the same Spark wallet that holds your BTC is what signs the swap. Triggers on swap/exchange/convert/trade phrasings involving BTC + a Spark token, or explicit mention of Flashnet."
4
+ tools: flashnet_list_pools, flashnet_get_pool, flashnet_simulate_swap, flashnet_execute_swap, flashnet_get_balance, spark_get_balance, spark_get_address, get_price, fiat_to_sats
5
+ triggers: flashnet, swap, exchange, convert, trade, usdb, amm, pool, liquidity, btc to usdb, usdb to btc, spark swap
6
+ metadata:
7
+ author: kaleidoswap
8
+ version: "1.0.0"
9
+ venue: flashnet
10
+ ---
11
+
12
+ # Flashnet swaps
13
+
14
+ Flashnet is a Spark-native AMM. The user's Spark wallet IS the swap account —
15
+ there's no separate exchange balance. A swap takes one asset from the wallet,
16
+ sends it through a pool, and returns the other asset to the same wallet, in
17
+ seconds. Two pool curve types exist (constant-product and V3 concentrated
18
+ liquidity) — the model doesn't need to care; the pool id is enough.
19
+
20
+ ## What Flashnet trades (and what it does NOT)
21
+
22
+ **Flashnet trades:**
23
+ - **BTC** ↔ **Spark-native tokens**. The canonical example is **USDB**.
24
+ - Whatever pools `flashnet_list_pools` returns — that list is the
25
+ authoritative answer to "what can I trade here?".
26
+
27
+ **Flashnet does NOT trade:**
28
+ - **RGB assets** (USDT, XAUT, …). RGB assets live on the RLN layer and
29
+ trade via the **KaleidoSwap maker** (`kaleido-trading` skill), not here.
30
+ USDT on Flashnet does not exist — never offer it.
31
+ - Assets the user holds on Arkade, on-chain BTC reserves, or any external
32
+ chain. The trade-account is the Spark wallet.
33
+
34
+ If the user asks for an asset you can't see in `flashnet_list_pools`, tell
35
+ them so plainly and (if it's a known RGB asset like USDT/XAUT) point them
36
+ at the kaleido-trading skill rather than inventing a Flashnet pool.
37
+
38
+ ## Critical rules (read first)
39
+
40
+ 1. **Never invent a pool id, asset address, or amount.** Every `pool_id`,
41
+ `asset_in_address`, `asset_out_address`, `amount_in` you pass MUST come
42
+ from `flashnet_list_pools` / `flashnet_simulate_swap` / a tool-returned
43
+ value in the CURRENT turn — never from history, never guessed.
44
+ **ALWAYS start a swap by calling `flashnet_list_pools`** to get the real
45
+ pool id + asset addresses. You may pass `BTC` as a literal asset (the
46
+ host resolves it), but for any TOKEN you must use the exact
47
+ `asset_a_address` / `asset_b_address` the pool returned. Token tickers
48
+ (e.g. `USDB`) only resolve if the network publishes them or the host is
49
+ configured; if a ticker doesn't resolve, the result rows carry the
50
+ addresses — use those. Each pool row includes `asset_a_symbol` /
51
+ `asset_b_symbol` when known (e.g. `"BTC"`); pick the pool whose pair
52
+ matches the user's intent and read its addresses from that row.
53
+ 2. **Always simulate before executing.** Call `flashnet_simulate_swap` to
54
+ get `amount_out` + `price_impact_pct`, show the user the rate in plain
55
+ English, get explicit confirmation, then call `flashnet_execute_swap`.
56
+ The host fires one extra confirmation gate on execute — that's the
57
+ safety net, not the primary one.
58
+ 3. **Compute `min_amount_out` yourself.** Never pass the simulated
59
+ `amount_out` directly to execute. The standard formula is
60
+ `min_amount_out = floor(amount_out × (1 − max_slippage_bps / 10000))`.
61
+ Default `max_slippage_bps: 50` (0.5%). Use 100 for volatile pairs or
62
+ high price impact (>0.5%); ask the user before going higher than 1%.
63
+ 4. **Smallest units, as strings.** `amount_in` / `min_amount_out` are in
64
+ the asset's smallest unit (sats for BTC; the token's smallest decimal
65
+ place for tokens). Pass them as JSON strings so BigInt-sized values
66
+ survive round-trip. e.g. `amount_in: "100000"` for 100k sats, NOT
67
+ `amount_in: 100000`.
68
+ 5. **High price impact = stop and ask.** If
69
+ `simulate_swap.price_impact_pct > 1.0`, surface it explicitly:
70
+ "This trade would move the price by 1.7%. Continue?" Don't auto-execute
71
+ anything with >2% impact without a clear user yes.
72
+ 6. **Get the direction right — `asset_in` is what the user SPENDS,
73
+ `asset_out` is what they GET.** Parse the request literally:
74
+ - "spend 2000 sats to get USDB" → asset_in = BTC, asset_out = USDB,
75
+ amount_in = 2000 (the sats spent).
76
+ - "swap 10 USDB to BTC" / "sell 10 USDB for sats" → asset_in = USDB,
77
+ asset_out = BTC, amount_in = the USDB amount.
78
+ - "buy USDB with 2000 sats" → asset_in = BTC, asset_out = USDB.
79
+ `amount_in` is ALWAYS denominated in `asset_in`. Double-check before
80
+ simulating: if the user said "spend N sats", asset_in MUST be BTC and
81
+ amount_in MUST be N.
82
+
83
+ ## Happy-path playbook
84
+
85
+ For a typical "swap 100k sats to USDB":
86
+
87
+ 1. **`flashnet_list_pools({ asset_a: <BTC>, asset_b: <USDB> })`** — find a
88
+ pool. Pick the first result (already sorted by TVL desc). Save its
89
+ `pool_id`, `asset_a_address`, `asset_b_address`.
90
+
91
+ - If the user named a specific asset by *symbol* (e.g. "USDB"), the host
92
+ fills in the token address based on the active Spark network. The
93
+ model just passes the symbol or whatever address the prior tool
94
+ returned.
95
+
96
+ 2. **`flashnet_simulate_swap({ pool_id, asset_in_address, asset_out_address, amount_in })`**
97
+ — get `amount_out`, `execution_price`, `price_impact_pct`,
98
+ `fee_paid_asset_in`. Show the user one short line:
99
+
100
+ `Swap 100,000 sats → ~497,500 USDB (0.5% pool fee, 0.18% price impact).
101
+ Proceed?`
102
+
103
+ 3. **Compute `min_amount_out`** from the simulated `amount_out` and the
104
+ chosen slippage tolerance (default 0.5% / 50 bps). Don't trust the
105
+ simulated value as-is.
106
+
107
+ 4. **`flashnet_execute_swap({ pool_id, asset_in_address, asset_out_address,
108
+ amount_in, min_amount_out, max_slippage_bps })`** — SPEND, gated. On
109
+ success returns the swap `request_id` and the actual `amount_out`.
110
+ Surface the realised amount on a single line.
111
+
112
+ ## When to use which tool
113
+
114
+ | Tool | Use when |
115
+ |---|---|
116
+ | `flashnet_list_pools` | First step of any swap; or when the user asks "what pools exist for X/Y". |
117
+ | `flashnet_get_pool` | User wants pool depth / current price / TVL before swapping. |
118
+ | `flashnet_simulate_swap` | EVERY swap, before execute. Also for "what would I get if I swapped 5k sats?" — read-only quote. |
119
+ | `flashnet_execute_swap` | After user confirms the simulated quote. Confirmation-gated. |
120
+ | `flashnet_get_balance` | Pre-swap balance check, or "what do I have on Spark/Flashnet". (Reads from the same wallet `spark_get_balance` reads — they are not separate accounts.) |
121
+
122
+ ## Cross-skill flow with spark-wallet
123
+
124
+ The Spark wallet and Flashnet share the same on-device account. Common
125
+ chains:
126
+
127
+ - **Pre-swap balance check.** `spark_get_balance` (or
128
+ `flashnet_get_balance`) → confirm the user has enough sats → quote →
129
+ execute.
130
+ - **Deposit then swap.** User has on-chain BTC → `spark_get_address` to
131
+ receive into Spark → wait for confirmation (the user does that
132
+ externally) → swap.
133
+ - **Swap then pay invoice.** User has USDB but needs to pay a BOLT11
134
+ invoice → swap USDB → BTC (this skill) → `spark_pay_invoice` (the
135
+ spark-wallet skill) → done.
136
+
137
+ ## Failure handling
138
+
139
+ Tool errors arrive as `Error.message`. Common ones:
140
+
141
+ - **`Insufficient balance`** — the wallet doesn't hold enough
142
+ `asset_in`. Surface the deficit. Suggest depositing or swapping less.
143
+ - **`Slippage exceeded` / `min_amount_out not met`** — the pool moved
144
+ between simulate and execute. Re-simulate and try again (the host can
145
+ do this; don't loop more than 2× automatically — ask the user after
146
+ that).
147
+ - **`Pool not found` / `Asset not allowed`** — pool id stale or wrong
148
+ network. Re-list pools.
149
+ - **Authentication / connection errors** — the Spark wallet isn't
150
+ initialized. Say so plainly; don't fake a result.
151
+
152
+ ## Reply style
153
+
154
+ - Quote line: amount in, amount out, fee, price impact — all on one line.
155
+ - After execute: one-line result with realised amount and tx id.
156
+ - Never paste a multi-line JSON of the simulate/execute response.
157
+ - Don't echo `amount_in` / `min_amount_out` raw numbers in subsequent
158
+ turns; the model isn't a ledger.
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: kaleido-lsps
3
3
  description: "Buy inbound Lightning channel capacity from a Lightning Service Provider (LSPS1). Quote a channel, estimate fees, place a channel order, and check order status. Triggers when the user wants inbound liquidity, says they can't receive a payment, needs a channel, asks about LSP fees, or wants to check the status of a channel order / LSP order."
4
- tools: kaleidoswap_lsp_get_info, kaleidoswap_lsp_estimate_fees, kaleidoswap_lsp_create_order, kaleidoswap_lsp_get_order, kaleidoswap_lsp_quote_asset_channel, kaleidoswap_lsp_create_asset_channel, lsp_get_info, lsp_estimate_fees, lsp_create_order, lsp_get_order, rln_get_node_info, rln_pay_invoice
5
- triggers: inbound, liquidity, channel order, lsp, lsps1, receive limit, can't receive, open channel, channel from, check status, order status, check the order, channel status, lsp status, check my channel
4
+ tools: lsp_get_info, lsp_get_network_info, lsp_estimate_fees, lsp_create_order, lsp_get_order, kaleidoswap_lsp_get_info, kaleidoswap_lsp_estimate_fees, kaleidoswap_lsp_create_order, kaleidoswap_lsp_get_order, kaleidoswap_lsp_quote_asset_channel, kaleidoswap_lsp_create_asset_channel, rln_get_node_info, rln_list_channels, rln_pay_invoice
5
+ triggers: inbound, liquidity, channel order, lsp, lsps1, receive limit, can't receive, open channel, channel from, check status, order status, check the order, channel status, lsp status, check my channel, check lsp order, did the channel open, lsp order status, list my channels, my channels, channel capacity
6
6
  metadata:
7
7
  author: kaleidoswap
8
8
  version: "0.2.0"
@@ -82,11 +82,26 @@ Returns:
82
82
  Hand the `payment.bolt11.invoice` to `rln_pay_invoice`. This is a separate
83
83
  spend gate at the wallet contract; the user confirms paying the LSP.
84
84
 
85
- ### Step 6 — `kaleidoswap_lsp_get_order` (poll)
86
- **Args: `order_id`, `access_token` (BOTH required never omit either).**
87
- `order_state` progresses `CREATED CHANNEL_OPENING COMPLETED` (or `FAILED`).
88
- Poll until terminal. Always pass the exact order_id and access_token from the
89
- previous `kaleidoswap_lsp_create_order` result (or from the summary that listed them).
85
+ ### Verify the opened channel — `rln_list_channels`
86
+ After an order completes (or when the user asks "do I have a channel with X
87
+ inbound?", "list my channels", "did my channel open?"), call
88
+ `rln_list_channels`. It returns each channel's `capacity_sat`, `inbound_sat`,
89
+ `outbound_sat`, `ready`/`status`, and RGB `asset_*` amounts. Match the
90
+ requested capacity against an actual channel to confirm it opened correctly.
91
+ A freshly-bought channel opens ASYNCHRONOUSLY — if it isn't listed yet, say
92
+ it's still opening, don't claim failure. Do NOT use `rln_get_node_info` for
93
+ this (it only has counts + aggregate balance, not per-channel capacity).
94
+
95
+ ### Step 6 — poll the order (`lsp_get_order` / `kaleidoswap_lsp_get_order`)
96
+ Use `lsp_get_order` on CLI hosts, `kaleidoswap_lsp_get_order` on desktop —
97
+ whichever your host exposes. **Args: `order_id`, `access_token` (BOTH
98
+ required — never omit either).** `order_state` progresses
99
+ `CREATED → CHANNEL_OPENING → COMPLETED` (or `FAILED`). Poll until terminal.
100
+ Always pass the exact order_id and access_token from the previous
101
+ create-order result **or from the most recent assistant message/summary**
102
+ (the one that said something like "order_id=xxx access_token=yyy" or "To
103
+ check status use: lsp_get_order(order_id=..., access_token=...)"). If
104
+ memory/remember is available, first recall the last LSPS1 order details.
90
105
  Report the outcome plainly with the new channel id from `channel.channel_id` if present.
91
106
 
92
107
  ## Don'ts
@@ -101,7 +116,9 @@ Report the outcome plainly with the new channel id from `channel.channel_id` if
101
116
  `order_id` and `access_token` and seeing `order_state: COMPLETED`.
102
117
  - Never call `kaleidoswap_lsp_get_order` with only the access_token or only the order_id.
103
118
  Always extract the exact values from the previous turn's summary (the one that
104
- said "order_id=... access_token=...") and pass them as separate arguments.
119
+ said "order_id=... access_token=..." or the explicit "To check status use..." line)
120
+ and pass them as separate arguments. If using the `remember` tool, first recall
121
+ the last channel/LSPS1 order details.
105
122
  - Don't ask the user for their node pubkey — fetch it from `rln_get_node_info`.
106
123
 
107
124
  ## When the deterministic recipe handles it
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: kaleido-trading
3
- description: "Trade on KaleidoSwap — quote and execute swaps between BTC and RGB assets (USDT, XAUT). Get assets and pairs, pull an executable quote, place a market order, or track an atomic swap end-to-end. Triggers when the user wants a quote, to swap or trade assets, or to rebalance between BTC and stablecoins."
3
+ description: "Trade on KaleidoSwap — quote and execute swaps between BTC and RGB assets (USDT, XAUT). Get assets and pairs, pull an executable quote, place a market order, track orders, or run/poll an atomic swap end-to-end. Triggers when the user wants a quote, to swap or trade assets, to rebalance between BTC and stablecoins, or to check the status of an order / swap / atomic swap."
4
4
  tools: kaleidoswap_get_assets, kaleidoswap_get_pairs, kaleidoswap_get_quote, kaleidoswap_place_order, kaleidoswap_get_order_status, kaleidoswap_atomic_init, kaleidoswap_atomic_execute, kaleidoswap_atomic_status, rln_get_node_info, rln_atomic_taker
5
- triggers: quote, swap, trade, rebalance, slippage, pair, pairs, usdt, xaut, kaleidoswap, rfq
5
+ triggers: quote, swap, trade, rebalance, slippage, pair, pairs, usdt, xaut, kaleidoswap, rfq, check status, order status, check the order, swap status, check my swap, atomic status
6
6
  metadata:
7
7
  author: kaleidoswap
8
8
  version: "0.4.0"
@@ -40,15 +40,28 @@ which pair + amount.
40
40
 
41
41
  ## Asset codes (canonical)
42
42
 
43
+ KaleidoSwap is the maker for **BTC ↔ RGB asset** atomic swaps. The asset
44
+ family is **RGB**: USDT, XAUT, and any other RGB asset the maker prices.
45
+ The RGB assets live on the user's **RLN** (RGB Lightning Node) — NOT on
46
+ Spark, Arkade, or any other chain.
47
+
43
48
  Only these codes are accepted:
44
49
 
45
50
  - `BTC` (Bitcoin, amounts always in satoshis)
46
- - `USDT` (Tether) — **not** `USD`, **not** `tether`
47
- - `XAUT` (Tether Gold) — **not** `XAU`, **not** `gold`
51
+ - `USDT` (Tether, the RGB asset) — **not** `USD`, **not** `tether`
52
+ - `XAUT` (Tether Gold, the RGB asset) — **not** `XAU`, **not** `gold`
48
53
 
49
54
  When the user types `USD` they almost always mean `USDT` — confirm before
50
55
  quoting. Same for `gold` → `XAUT`. Don't silently substitute.
51
56
 
57
+ **Do NOT trade here:**
58
+
59
+ - `USDB` and any other **Spark-native token** — those are on the Spark
60
+ layer and trade on **Flashnet** (skill: `flashnet-swaps`), not on
61
+ KaleidoSwap. Route the user there instead of inventing a maker pair.
62
+ - Tokens from external chains (Ethereum USDT, Solana, etc.). They are
63
+ not in the maker's catalog and the wallet does not custody them.
64
+
52
65
  ## Tools
53
66
 
54
67
  ### `kaleidoswap_get_pairs` — no args
@@ -113,13 +126,16 @@ Only after `kaleidoswap_get_quote` returned an `rfq_id` THIS turn, and only when
113
126
  the user has explicitly approved the amount + direction. Pass the `rfq_id` as
114
127
  `quote_id`.
115
128
 
116
- **Save the `order_id` AND `access_token` from the result** — you will need both
117
- for polling status later.
129
+ **Save the `order_id` AND `access_token` from the result** (BOTH required never omit either). Extract them verbatim from the tool result (or the most recent assistant summary that listed "order_id=... access_token=..."). If memory/remember is available, first recall the last order details before polling status. You will need both for `kaleidoswap_get_order_status` later.
118
130
 
119
131
  ### `kaleidoswap_get_order_status(order_id, access_token)`
120
- Poll after placing an order. **Pass both the order_id and the access_token**
121
- (saved from place_order). Report status plainly — pending, settling,
122
- completed, failed.
132
+ **Args: `order_id`, `access_token` (BOTH required never omit either).**
133
+ Poll after placing an order (or atomic). `order_state` (or equivalent) progresses
134
+ to terminal states. Always pass the exact values from the previous
135
+ `kaleidoswap_place_order` result **or from the most recent assistant message/summary**
136
+ (the one that said something like "order_id=xxx access_token=yyy" or "To check status use: kaleidoswap_get_order_status(order_id=..., access_token=...)").
137
+ If memory/remember is available, first recall the last order/swap details.
138
+ Report the outcome plainly.
123
139
 
124
140
  ## Flow
125
141
 
@@ -128,11 +144,11 @@ completed, failed.
128
144
  3. **Read + present** — compute the receive amount + fee from the response (see
129
145
  "Reading the quote response"). **Never hide cost.**
130
146
  4. **Place** — spend-gated by the engine. The host pauses for the user.
131
- 5. **Track** — poll `kaleidoswap_get_order_status(order_id, access_token)` (use both values saved from place_order) until it terminates.
147
+ 5. **Track** — poll `kaleidoswap_get_order_status(order_id, access_token)` (use both values saved from place_order or the explicit "To check status..." template) until it terminates. For atomic swaps the status tool is `kaleidoswap_atomic_status(atomic_id)`.
132
148
 
133
149
  ## Don'ts
134
150
 
135
- - Don't invent prices, quotes, rfq_ids, or order_ids.
151
+ - Don't invent prices, quotes, rfq_ids, order_ids, or access_tokens.
136
152
  - Don't reuse a number from a previous turn.
137
153
  - Don't describe how a tool works — call it.
138
154
  - Don't call `kaleidoswap_get_quote` with from/to only — ask for the amount.
@@ -142,7 +158,15 @@ completed, failed.
142
158
  - Don't accept `XAU` as `XAUT` or `USD` as `USDT` silently — confirm.
143
159
  - Don't retry the same failing tool call in a loop. If a call fails, read the
144
160
  error and either ask the user, fix the args, or stop.
161
+ - Don't claim an order completed without polling the status tool with BOTH
162
+ required ids/tokens and seeing a terminal state.
163
+ - Never call `kaleidoswap_get_order_status` with only the access_token or only
164
+ the order_id. Always extract the exact values from the previous turn's summary
165
+ (the one that said "order_id=... access_token=..." or the explicit "To check
166
+ status use..." line) and pass them as separate arguments. If using the
167
+ `remember` tool, first recall the last order details.
145
168
 
146
169
  For the full atomic-swap flow (init → whitelist on the RGB node → execute), a
147
170
  deterministic recipe drives the chain — the agentic loop is not safe to plan a
148
- multi-step, two-service swap on a small model.
171
+ multi-step, two-service swap on a small model. Status for atomics uses the
172
+ `atomic_id` (or payment_hash) surfaced in the recipe summary.
@@ -2,7 +2,7 @@
2
2
  name: merchant-finder
3
3
  description: "Find Bitcoin-accepting merchants near the user using live BTC Map data and the device's real location. Triggers when the user asks where to spend Bitcoin, buy pizza/food with sats or bitcoin, eat at restaurants/cafes paying with sats, for a shop, store, restaurant, cafe, bar, or ATM that accepts Bitcoin, or for merchants nearby or in a city like turin."
4
4
  tools: find_merchant_locations, search_knowledge
5
- triggers: merchant, merchants, shop, shops, store, stores, restaurant, restaurants, cafe, cafes, bar, bars, atm, atms, accept, accepts, accepting, nearby, near me, around, place, places, spend, find, pizza, pizz, food, coffee, eat, dinner, lunch, buy, bitcoin map, btcmap
5
+ triggers: merchant, merchants, shop, shops, store, stores, restaurant, restaurants, cafe, cafes, bar, bars, atm, atms, accept, accepts, accepting, nearby, near me, around me, where can i spend, pizza, pizz, food, coffee, eat, dinner, lunch, bitcoin map, btcmap
6
6
  metadata:
7
7
  author: kaleidoswap
8
8
  version: "0.3.0"
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: rgb-lightning-node
3
- description: "Drive the user's local RGB Lightning Node (RLN) — read its pubkey/status, whitelist a swap, or create Lightning/RGB receive invoices. Triggers when the user asks about the node, needs an invoice, or is mid-atomic-swap and the maker needs the node pubkey or a swapstring whitelisted."
4
- tools: rln_get_node_info, rln_get_balances, rln_list_channels, rln_open_channel, rln_close_channel, rln_connect_peer, rln_get_channel_id, rln_atomic_taker, rln_list_payments, rln_create_ln_invoice, rln_create_rgb_invoice
5
- triggers: node, nodeinfo, pubkey, peer, channels, whitelist, taker, swapstring, invoice, receive, rgb invoice, ln invoice
3
+ description: "Drive the user's local RGB Lightning Node (RLN) — read its pubkey/status, list channels and their capacities, check RGB asset balances, manage channels/peers, whitelist a swap, or create Lightning/RGB receive invoices. Triggers when the user asks about the node, their channels or capacities, needs an invoice, or is mid-atomic-swap and the maker needs the node pubkey or a swapstring whitelisted."
4
+ tools: rln_get_node_info, rln_get_balances, rln_list_channels, rln_list_assets, rln_get_asset_balance, rln_open_channel, rln_close_channel, rln_connect_peer, rln_get_channel_id, rln_whitelist_swap, rln_atomic_taker, rln_list_payments, rln_create_ln_invoice, rln_create_rgb_invoice
5
+ triggers: node, nodeinfo, pubkey, peer, channels, channel capacity, list channels, inbound, capacity, asset balance, whitelist, taker, swapstring, invoice, receive, rgb invoice, ln invoice
6
6
  metadata:
7
7
  author: kaleidoswap
8
8
  version: "0.1.0"
@@ -47,10 +47,37 @@ Call this when:
47
47
  `kaleidoswap_atomic_execute`.
48
48
 
49
49
  **Do NOT** use this tool's `local_balance_sat` to answer a question about
50
- **inbound liquidity / receive capacity** — that is a different quantity
51
- (the peer's side of each channel, not yours). For "how much can I receive?",
52
- the LSPS skill answers what's available to BUY (`lsp_get_info`); the current
53
- remote-balance breakdown isn't exposed by this skill's tools.
50
+ **inbound liquidity / receive capacity** — that is a different quantity (the
51
+ peer's side of each channel). For per-channel inbound/outbound and total
52
+ capacity, use `rln_list_channels` (below), NOT this tool.
53
+
54
+ ### `rln_list_channels` — no args
55
+ Returns `{ channels: [...], count }`. Each channel carries:
56
+ - `channel_id`, `peer_alias`, `status`, `ready`, `is_usable`
57
+ - `capacity_sat` — total channel size.
58
+ - `outbound_sat` — what YOU can send (your local balance).
59
+ - `inbound_sat` — what you can RECEIVE on this channel (the peer's side).
60
+ - `asset_id`, `asset_local_amount`, `asset_remote_amount` — for RGB asset
61
+ channels: the asset and how much is on each side.
62
+
63
+ Call this when the user asks to **list channels**, asks about **per-channel
64
+ capacity**, **inbound/receive capacity**, or wants to **verify a channel they
65
+ just bought** opened with the requested size. Report each channel as one line:
66
+ `capacity_sat total — outbound_sat / inbound_sat (asset if present), status`.
67
+
68
+ When verifying a freshly-bought channel: a channel order opens
69
+ ASYNCHRONOUSLY (seconds to minutes after payment). If the new channel isn't
70
+ listed yet, say it's still opening and suggest checking again — don't claim
71
+ failure.
72
+
73
+ ### `rln_list_assets` — no args
74
+ Lists RGB assets known to the node with per-asset balances (settled, future,
75
+ spendable, offchain_outbound, offchain_inbound). Use for "what assets do I
76
+ hold / what's my USDT balance".
77
+
78
+ ### `rln_get_asset_balance` — { asset_id }
79
+ Balance for one RGB asset by id. Use after `rln_list_assets` gave you the id,
80
+ or when the user names a specific asset.
54
81
 
55
82
  ### `rln_atomic_taker` — { swapstring } — 🔒 confirm-gated
56
83
  Tell the node "I accept this swap." Args: the `swapstring` returned by
@@ -92,7 +119,7 @@ A user-driven swap on KaleidoSwap is a two-service flow. Keep them straight:
92
119
  | Pubkey | **node** | `rln_get_node_info` (read `pubkey`) |
93
120
  | Whitelist | **node** | `rln_atomic_taker` (pass the swapstring) |
94
121
  | Execute | maker | `kaleidoswap_atomic_execute` (needs swapstring + taker_pubkey + payment_hash) |
95
- | Status | maker | `kaleidoswap_atomic_status` |
122
+ | Status | maker | `kaleidoswap_atomic_status` (pass atomic_id or payment_hash from the atomic recipe summary or prior init result; see "remember" line in history) |
96
123
 
97
124
  The node's two contributions to the swap are the **pubkey** and the
98
125
  **whitelist ack** — nothing more. Don't reach for `/makerinit` or