@fiber-pay/agent 0.1.0-rc.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.
- package/README.md +145 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1526 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-tools.d.ts +842 -0
- package/dist/mcp-tools.js +443 -0
- package/dist/mcp-tools.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
// src/mcp-tools.ts
|
|
2
|
+
var MCP_TOOLS = {
|
|
3
|
+
fiber_pay: {
|
|
4
|
+
name: "fiber_pay",
|
|
5
|
+
description: `Pay an invoice or send CKB directly to a node on the Lightning Network.
|
|
6
|
+
|
|
7
|
+
Examples:
|
|
8
|
+
- Pay an invoice: fiber_pay({ invoice: "fibt1..." })
|
|
9
|
+
- Send directly: fiber_pay({ recipientNodeId: "QmXXX...", amountCkb: 10 })
|
|
10
|
+
|
|
11
|
+
Returns payment status and tracking hash.`,
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
invoice: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "Lightning invoice string to pay (starts with fibt or fibb)"
|
|
18
|
+
},
|
|
19
|
+
recipientNodeId: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "Recipient node ID for direct payment (keysend)"
|
|
22
|
+
},
|
|
23
|
+
amountCkb: {
|
|
24
|
+
type: "number",
|
|
25
|
+
description: "Amount to send in CKB (required for keysend)"
|
|
26
|
+
},
|
|
27
|
+
maxFeeCkb: {
|
|
28
|
+
type: "number",
|
|
29
|
+
description: "Maximum fee willing to pay in CKB"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
oneOf: [{ required: ["invoice"] }, { required: ["recipientNodeId", "amountCkb"] }]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
fiber_create_invoice: {
|
|
36
|
+
name: "fiber_create_invoice",
|
|
37
|
+
description: `Create an invoice to receive payment.
|
|
38
|
+
|
|
39
|
+
Example: fiber_create_invoice({ amountCkb: 10, description: "For coffee" })
|
|
40
|
+
|
|
41
|
+
Returns invoice string to share with payer.`,
|
|
42
|
+
inputSchema: {
|
|
43
|
+
type: "object",
|
|
44
|
+
properties: {
|
|
45
|
+
amountCkb: {
|
|
46
|
+
type: "number",
|
|
47
|
+
description: "Amount to receive in CKB"
|
|
48
|
+
},
|
|
49
|
+
description: {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: "Description for the payer"
|
|
52
|
+
},
|
|
53
|
+
expiryMinutes: {
|
|
54
|
+
type: "number",
|
|
55
|
+
description: "Invoice expiry time in minutes (default: 60)"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
required: ["amountCkb"]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
fiber_get_balance: {
|
|
62
|
+
name: "fiber_get_balance",
|
|
63
|
+
description: `Get current balance information including:
|
|
64
|
+
- Total balance in CKB
|
|
65
|
+
- Available to send
|
|
66
|
+
- Available to receive
|
|
67
|
+
- Number of channels
|
|
68
|
+
- Remaining spending allowance
|
|
69
|
+
|
|
70
|
+
No parameters required.`,
|
|
71
|
+
inputSchema: {
|
|
72
|
+
type: "object",
|
|
73
|
+
properties: {}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
fiber_get_payment_status: {
|
|
77
|
+
name: "fiber_get_payment_status",
|
|
78
|
+
description: `Check the status of a payment by its hash.
|
|
79
|
+
|
|
80
|
+
Example: fiber_get_payment_status({ paymentHash: "0x..." })`,
|
|
81
|
+
inputSchema: {
|
|
82
|
+
type: "object",
|
|
83
|
+
properties: {
|
|
84
|
+
paymentHash: {
|
|
85
|
+
type: "string",
|
|
86
|
+
description: "Payment hash to check"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
required: ["paymentHash"]
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
fiber_get_invoice_status: {
|
|
93
|
+
name: "fiber_get_invoice_status",
|
|
94
|
+
description: `Check the status of an invoice (whether it's been paid).
|
|
95
|
+
|
|
96
|
+
Example: fiber_get_invoice_status({ paymentHash: "0x..." })`,
|
|
97
|
+
inputSchema: {
|
|
98
|
+
type: "object",
|
|
99
|
+
properties: {
|
|
100
|
+
paymentHash: {
|
|
101
|
+
type: "string",
|
|
102
|
+
description: "Payment hash of the invoice"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
required: ["paymentHash"]
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
fiber_list_channels: {
|
|
109
|
+
name: "fiber_list_channels",
|
|
110
|
+
description: `List all payment channels with their balances and states.
|
|
111
|
+
|
|
112
|
+
No parameters required.`,
|
|
113
|
+
inputSchema: {
|
|
114
|
+
type: "object",
|
|
115
|
+
properties: {}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
fiber_open_channel: {
|
|
119
|
+
name: "fiber_open_channel",
|
|
120
|
+
description: `Open a new payment channel with a peer.
|
|
121
|
+
|
|
122
|
+
Example: fiber_open_channel({
|
|
123
|
+
peer: "/ip4/x.x.x.x/tcp/8228/p2p/QmXXX...",
|
|
124
|
+
fundingCkb: 100
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
Note: This requires on-chain CKB for funding.`,
|
|
128
|
+
inputSchema: {
|
|
129
|
+
type: "object",
|
|
130
|
+
properties: {
|
|
131
|
+
peer: {
|
|
132
|
+
type: "string",
|
|
133
|
+
description: "Peer multiaddr or node ID"
|
|
134
|
+
},
|
|
135
|
+
fundingCkb: {
|
|
136
|
+
type: "number",
|
|
137
|
+
description: "Amount of CKB to fund the channel"
|
|
138
|
+
},
|
|
139
|
+
isPublic: {
|
|
140
|
+
type: "boolean",
|
|
141
|
+
description: "Whether to make the channel public (default: true)"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
required: ["peer", "fundingCkb"]
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
fiber_close_channel: {
|
|
148
|
+
name: "fiber_close_channel",
|
|
149
|
+
description: `Close a payment channel and settle funds on-chain.
|
|
150
|
+
|
|
151
|
+
Example: fiber_close_channel({ channelId: "0x..." })
|
|
152
|
+
|
|
153
|
+
Use force: true only if peer is unresponsive.`,
|
|
154
|
+
inputSchema: {
|
|
155
|
+
type: "object",
|
|
156
|
+
properties: {
|
|
157
|
+
channelId: {
|
|
158
|
+
type: "string",
|
|
159
|
+
description: "Channel ID to close"
|
|
160
|
+
},
|
|
161
|
+
force: {
|
|
162
|
+
type: "boolean",
|
|
163
|
+
description: "Force close (unilateral, use only if peer unresponsive)"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
required: ["channelId"]
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
fiber_get_node_info: {
|
|
170
|
+
name: "fiber_get_node_info",
|
|
171
|
+
description: `Get information about this node including node ID, public key, and statistics.
|
|
172
|
+
|
|
173
|
+
No parameters required.`,
|
|
174
|
+
inputSchema: {
|
|
175
|
+
type: "object",
|
|
176
|
+
properties: {}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
fiber_get_spending_allowance: {
|
|
180
|
+
name: "fiber_get_spending_allowance",
|
|
181
|
+
description: `Get remaining spending allowance based on security policy.
|
|
182
|
+
|
|
183
|
+
Returns:
|
|
184
|
+
- Per-transaction limit in CKB
|
|
185
|
+
- Remaining allowance for current time window
|
|
186
|
+
|
|
187
|
+
No parameters required.`,
|
|
188
|
+
inputSchema: {
|
|
189
|
+
type: "object",
|
|
190
|
+
properties: {}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
fiber_download_binary: {
|
|
194
|
+
name: "fiber_download_binary",
|
|
195
|
+
description: `Download and install the Fiber Network Node (fnn) binary for the current platform.
|
|
196
|
+
|
|
197
|
+
This is required before using any Fiber payment features. The binary will be automatically
|
|
198
|
+
downloaded from GitHub releases and installed to the data directory.
|
|
199
|
+
|
|
200
|
+
Examples:
|
|
201
|
+
- Download latest: fiber_download_binary({})
|
|
202
|
+
- Download specific version: fiber_download_binary({ version: "v0.4.0" })
|
|
203
|
+
- Force re-download: fiber_download_binary({ force: true })
|
|
204
|
+
|
|
205
|
+
Returns the path to the installed binary.`,
|
|
206
|
+
inputSchema: {
|
|
207
|
+
type: "object",
|
|
208
|
+
properties: {
|
|
209
|
+
version: {
|
|
210
|
+
type: "string",
|
|
211
|
+
description: 'Specific version to download (e.g., "v0.4.0"). Defaults to latest.'
|
|
212
|
+
},
|
|
213
|
+
force: {
|
|
214
|
+
type: "boolean",
|
|
215
|
+
description: "Force re-download even if binary already exists"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
fiber_validate_invoice: {
|
|
221
|
+
name: "fiber_validate_invoice",
|
|
222
|
+
description: `Validate an invoice before payment. Checks format, cryptographic correctness, expiry,
|
|
223
|
+
amount, and peer connectivity. Returns recommendation to proceed, warn, or reject.
|
|
224
|
+
|
|
225
|
+
Use this BEFORE paying an invoice to ensure safety.
|
|
226
|
+
|
|
227
|
+
Example: fiber_validate_invoice({ invoice: "fibt1..." })
|
|
228
|
+
|
|
229
|
+
Returns:
|
|
230
|
+
- valid: boolean (overall validity)
|
|
231
|
+
- details: parsed invoice details (amount, expiry, payment hash)
|
|
232
|
+
- checks: individual validation results (format, expiry, amount, preimage, peer)
|
|
233
|
+
- issues: list of warnings and critical issues found
|
|
234
|
+
- recommendation: 'proceed' | 'warn' | 'reject'
|
|
235
|
+
- reason: human-readable recommendation reason`,
|
|
236
|
+
inputSchema: {
|
|
237
|
+
type: "object",
|
|
238
|
+
properties: {
|
|
239
|
+
invoice: {
|
|
240
|
+
type: "string",
|
|
241
|
+
description: "Invoice string to validate (starts with fibt or fibb)"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
required: ["invoice"]
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
fiber_get_payment_proof: {
|
|
248
|
+
name: "fiber_get_payment_proof",
|
|
249
|
+
description: `Get cryptographic proof of payment execution. Useful for audit trail and reconciliation.
|
|
250
|
+
|
|
251
|
+
Example: fiber_get_payment_proof({ paymentHash: "0x..." })
|
|
252
|
+
|
|
253
|
+
Returns stored payment proof including:
|
|
254
|
+
- Invoice original
|
|
255
|
+
- Preimage (if available)
|
|
256
|
+
- Fee breakdown
|
|
257
|
+
- Verification status
|
|
258
|
+
- Proof metadata`,
|
|
259
|
+
inputSchema: {
|
|
260
|
+
type: "object",
|
|
261
|
+
properties: {
|
|
262
|
+
paymentHash: {
|
|
263
|
+
type: "string",
|
|
264
|
+
description: "Payment hash to retrieve proof for"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
required: ["paymentHash"]
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
fiber_analyze_liquidity: {
|
|
271
|
+
name: "fiber_analyze_liquidity",
|
|
272
|
+
description: `Comprehensive liquidity analysis across all channels. Provides health metrics,
|
|
273
|
+
identifies issues, and generates recommendations for rebalancing and funding.
|
|
274
|
+
|
|
275
|
+
Use this to:
|
|
276
|
+
- Understand current channel health
|
|
277
|
+
- Identify liquidity gaps
|
|
278
|
+
- Get rebalancing recommendations
|
|
279
|
+
- Estimate available runway
|
|
280
|
+
|
|
281
|
+
No parameters required.
|
|
282
|
+
|
|
283
|
+
Returns:
|
|
284
|
+
- balance: total, available to send/receive
|
|
285
|
+
- channels: health metrics for each channel
|
|
286
|
+
- liquidity: gaps and runway estimation
|
|
287
|
+
- recommendations: rebalance suggestions and funding needs
|
|
288
|
+
- summary: human-readable status`,
|
|
289
|
+
inputSchema: {
|
|
290
|
+
type: "object",
|
|
291
|
+
properties: {}
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
fiber_can_send: {
|
|
295
|
+
name: "fiber_can_send",
|
|
296
|
+
description: `Check if you have enough liquidity to send a specific amount. Returns shortfall
|
|
297
|
+
if insufficient and recommendations.
|
|
298
|
+
|
|
299
|
+
Use this BEFORE attempting a payment to verify you have enough liquidity.
|
|
300
|
+
|
|
301
|
+
Example: fiber_can_send({ amountCkb: 100 })
|
|
302
|
+
|
|
303
|
+
Returns:
|
|
304
|
+
- canSend: boolean
|
|
305
|
+
- shortfallCkb: missing amount (0 if can send)
|
|
306
|
+
- availableCkb: current available balance
|
|
307
|
+
- recommendation: what to do if insufficient`,
|
|
308
|
+
inputSchema: {
|
|
309
|
+
type: "object",
|
|
310
|
+
properties: {
|
|
311
|
+
amountCkb: {
|
|
312
|
+
type: "number",
|
|
313
|
+
description: "Amount in CKB to check"
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
required: ["amountCkb"]
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
fiber_create_hold_invoice: {
|
|
320
|
+
name: "fiber_create_hold_invoice",
|
|
321
|
+
description: `Create a hold invoice for escrow or conditional payments.
|
|
322
|
+
|
|
323
|
+
A hold invoice locks the payer's funds until you explicitly settle with the preimage,
|
|
324
|
+
or the invoice expires. This enables escrow patterns without a trusted third party.
|
|
325
|
+
|
|
326
|
+
Example: fiber_create_hold_invoice({
|
|
327
|
+
amountCkb: 10,
|
|
328
|
+
paymentHash: "0x...",
|
|
329
|
+
description: "Escrow for service delivery"
|
|
330
|
+
})
|
|
331
|
+
|
|
332
|
+
Flow:
|
|
333
|
+
1. Generate a secret preimage and compute its SHA-256 hash
|
|
334
|
+
2. Create hold invoice with the hash
|
|
335
|
+
3. Share invoice with payer \u2014 their funds are held when they pay
|
|
336
|
+
4. When conditions are met, call fiber_settle_invoice with the preimage
|
|
337
|
+
5. If conditions are NOT met, let the invoice expire (funds return to payer)
|
|
338
|
+
|
|
339
|
+
Returns invoice string and payment hash.`,
|
|
340
|
+
inputSchema: {
|
|
341
|
+
type: "object",
|
|
342
|
+
properties: {
|
|
343
|
+
amountCkb: {
|
|
344
|
+
type: "number",
|
|
345
|
+
description: "Amount to receive in CKB"
|
|
346
|
+
},
|
|
347
|
+
paymentHash: {
|
|
348
|
+
type: "string",
|
|
349
|
+
description: "SHA-256 hash of your secret preimage (0x-prefixed hex)"
|
|
350
|
+
},
|
|
351
|
+
description: {
|
|
352
|
+
type: "string",
|
|
353
|
+
description: "Description for the payer"
|
|
354
|
+
},
|
|
355
|
+
expiryMinutes: {
|
|
356
|
+
type: "number",
|
|
357
|
+
description: "Invoice expiry time in minutes (default: 60)"
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
required: ["amountCkb", "paymentHash"]
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
fiber_settle_invoice: {
|
|
364
|
+
name: "fiber_settle_invoice",
|
|
365
|
+
description: `Settle a hold invoice by revealing the preimage.
|
|
366
|
+
|
|
367
|
+
This releases the held funds to you. Only call this after conditions are met.
|
|
368
|
+
The preimage must hash (SHA-256) to the payment_hash used when creating the hold invoice.
|
|
369
|
+
|
|
370
|
+
Example: fiber_settle_invoice({
|
|
371
|
+
paymentHash: "0x...",
|
|
372
|
+
preimage: "0x..."
|
|
373
|
+
})`,
|
|
374
|
+
inputSchema: {
|
|
375
|
+
type: "object",
|
|
376
|
+
properties: {
|
|
377
|
+
paymentHash: {
|
|
378
|
+
type: "string",
|
|
379
|
+
description: "Payment hash of the hold invoice"
|
|
380
|
+
},
|
|
381
|
+
preimage: {
|
|
382
|
+
type: "string",
|
|
383
|
+
description: "Secret preimage (0x-prefixed hex, 32 bytes)"
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
required: ["paymentHash", "preimage"]
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
fiber_wait_for_payment: {
|
|
390
|
+
name: "fiber_wait_for_payment",
|
|
391
|
+
description: `Wait for a payment to complete (reach Success or Failed status).
|
|
392
|
+
|
|
393
|
+
Polls the payment status until it reaches a terminal state. Useful after sending
|
|
394
|
+
a payment to wait for confirmation.
|
|
395
|
+
|
|
396
|
+
Example: fiber_wait_for_payment({ paymentHash: "0x...", timeoutMs: 60000 })
|
|
397
|
+
|
|
398
|
+
Returns the final payment status.`,
|
|
399
|
+
inputSchema: {
|
|
400
|
+
type: "object",
|
|
401
|
+
properties: {
|
|
402
|
+
paymentHash: {
|
|
403
|
+
type: "string",
|
|
404
|
+
description: "Payment hash to wait for"
|
|
405
|
+
},
|
|
406
|
+
timeoutMs: {
|
|
407
|
+
type: "number",
|
|
408
|
+
description: "Timeout in milliseconds (default: 120000 = 2 min)"
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
required: ["paymentHash"]
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
fiber_wait_for_channel_ready: {
|
|
415
|
+
name: "fiber_wait_for_channel_ready",
|
|
416
|
+
description: `Wait for a channel to become ready after opening.
|
|
417
|
+
|
|
418
|
+
After opening a channel, it takes time for the funding transaction to be confirmed
|
|
419
|
+
on-chain. This tool polls until the channel reaches ChannelReady state.
|
|
420
|
+
|
|
421
|
+
Example: fiber_wait_for_channel_ready({ channelId: "0x...", timeoutMs: 300000 })
|
|
422
|
+
|
|
423
|
+
Returns channel info once ready.`,
|
|
424
|
+
inputSchema: {
|
|
425
|
+
type: "object",
|
|
426
|
+
properties: {
|
|
427
|
+
channelId: {
|
|
428
|
+
type: "string",
|
|
429
|
+
description: "Channel ID to wait for"
|
|
430
|
+
},
|
|
431
|
+
timeoutMs: {
|
|
432
|
+
type: "number",
|
|
433
|
+
description: "Timeout in milliseconds (default: 300000 = 5 min)"
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
required: ["channelId"]
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
export {
|
|
441
|
+
MCP_TOOLS
|
|
442
|
+
};
|
|
443
|
+
//# sourceMappingURL=mcp-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/mcp-tools.ts"],"sourcesContent":["/**\n * MCP (Model Context Protocol) Tool Definitions\n * These schemas are compatible with Claude, OpenClaw, and other MCP agents\n */\n\nimport type {\n AgentResult,\n BalanceInfo,\n ChannelSummary,\n HoldInvoiceResult,\n InvoiceResult,\n PaymentResult,\n} from './fiber-pay.js';\n\n// =============================================================================\n// MCP Tool Schema Definitions\n// =============================================================================\n\n/**\n * Tool definitions for MCP integration\n * Each tool has:\n * - name: unique identifier\n * - description: what the tool does (shown to the LLM)\n * - inputSchema: JSON Schema for parameters\n */\nexport const MCP_TOOLS = {\n fiber_pay: {\n name: 'fiber_pay',\n description: `Pay an invoice or send CKB directly to a node on the Lightning Network.\n \nExamples:\n- Pay an invoice: fiber_pay({ invoice: \"fibt1...\" })\n- Send directly: fiber_pay({ recipientNodeId: \"QmXXX...\", amountCkb: 10 })\n\nReturns payment status and tracking hash.`,\n inputSchema: {\n type: 'object',\n properties: {\n invoice: {\n type: 'string',\n description: 'Lightning invoice string to pay (starts with fibt or fibb)',\n },\n recipientNodeId: {\n type: 'string',\n description: 'Recipient node ID for direct payment (keysend)',\n },\n amountCkb: {\n type: 'number',\n description: 'Amount to send in CKB (required for keysend)',\n },\n maxFeeCkb: {\n type: 'number',\n description: 'Maximum fee willing to pay in CKB',\n },\n },\n oneOf: [{ required: ['invoice'] }, { required: ['recipientNodeId', 'amountCkb'] }],\n },\n },\n\n fiber_create_invoice: {\n name: 'fiber_create_invoice',\n description: `Create an invoice to receive payment.\n \nExample: fiber_create_invoice({ amountCkb: 10, description: \"For coffee\" })\n\nReturns invoice string to share with payer.`,\n inputSchema: {\n type: 'object',\n properties: {\n amountCkb: {\n type: 'number',\n description: 'Amount to receive in CKB',\n },\n description: {\n type: 'string',\n description: 'Description for the payer',\n },\n expiryMinutes: {\n type: 'number',\n description: 'Invoice expiry time in minutes (default: 60)',\n },\n },\n required: ['amountCkb'],\n },\n },\n\n fiber_get_balance: {\n name: 'fiber_get_balance',\n description: `Get current balance information including:\n- Total balance in CKB\n- Available to send\n- Available to receive\n- Number of channels\n- Remaining spending allowance\n\nNo parameters required.`,\n inputSchema: {\n type: 'object',\n properties: {},\n },\n },\n\n fiber_get_payment_status: {\n name: 'fiber_get_payment_status',\n description: `Check the status of a payment by its hash.\n \nExample: fiber_get_payment_status({ paymentHash: \"0x...\" })`,\n inputSchema: {\n type: 'object',\n properties: {\n paymentHash: {\n type: 'string',\n description: 'Payment hash to check',\n },\n },\n required: ['paymentHash'],\n },\n },\n\n fiber_get_invoice_status: {\n name: 'fiber_get_invoice_status',\n description: `Check the status of an invoice (whether it's been paid).\n \nExample: fiber_get_invoice_status({ paymentHash: \"0x...\" })`,\n inputSchema: {\n type: 'object',\n properties: {\n paymentHash: {\n type: 'string',\n description: 'Payment hash of the invoice',\n },\n },\n required: ['paymentHash'],\n },\n },\n\n fiber_list_channels: {\n name: 'fiber_list_channels',\n description: `List all payment channels with their balances and states.\n\nNo parameters required.`,\n inputSchema: {\n type: 'object',\n properties: {},\n },\n },\n\n fiber_open_channel: {\n name: 'fiber_open_channel',\n description: `Open a new payment channel with a peer.\n \nExample: fiber_open_channel({ \n peer: \"/ip4/x.x.x.x/tcp/8228/p2p/QmXXX...\", \n fundingCkb: 100 \n})\n\nNote: This requires on-chain CKB for funding.`,\n inputSchema: {\n type: 'object',\n properties: {\n peer: {\n type: 'string',\n description: 'Peer multiaddr or node ID',\n },\n fundingCkb: {\n type: 'number',\n description: 'Amount of CKB to fund the channel',\n },\n isPublic: {\n type: 'boolean',\n description: 'Whether to make the channel public (default: true)',\n },\n },\n required: ['peer', 'fundingCkb'],\n },\n },\n\n fiber_close_channel: {\n name: 'fiber_close_channel',\n description: `Close a payment channel and settle funds on-chain.\n \nExample: fiber_close_channel({ channelId: \"0x...\" })\n\nUse force: true only if peer is unresponsive.`,\n inputSchema: {\n type: 'object',\n properties: {\n channelId: {\n type: 'string',\n description: 'Channel ID to close',\n },\n force: {\n type: 'boolean',\n description: 'Force close (unilateral, use only if peer unresponsive)',\n },\n },\n required: ['channelId'],\n },\n },\n\n fiber_get_node_info: {\n name: 'fiber_get_node_info',\n description: `Get information about this node including node ID, public key, and statistics.\n\nNo parameters required.`,\n inputSchema: {\n type: 'object',\n properties: {},\n },\n },\n\n fiber_get_spending_allowance: {\n name: 'fiber_get_spending_allowance',\n description: `Get remaining spending allowance based on security policy.\n\nReturns:\n- Per-transaction limit in CKB\n- Remaining allowance for current time window\n\nNo parameters required.`,\n inputSchema: {\n type: 'object',\n properties: {},\n },\n },\n\n fiber_download_binary: {\n name: 'fiber_download_binary',\n description: `Download and install the Fiber Network Node (fnn) binary for the current platform.\n\nThis is required before using any Fiber payment features. The binary will be automatically \ndownloaded from GitHub releases and installed to the data directory.\n\nExamples:\n- Download latest: fiber_download_binary({})\n- Download specific version: fiber_download_binary({ version: \"v0.4.0\" })\n- Force re-download: fiber_download_binary({ force: true })\n\nReturns the path to the installed binary.`,\n inputSchema: {\n type: 'object',\n properties: {\n version: {\n type: 'string',\n description: 'Specific version to download (e.g., \"v0.4.0\"). Defaults to latest.',\n },\n force: {\n type: 'boolean',\n description: 'Force re-download even if binary already exists',\n },\n },\n },\n },\n\n fiber_validate_invoice: {\n name: 'fiber_validate_invoice',\n description: `Validate an invoice before payment. Checks format, cryptographic correctness, expiry, \namount, and peer connectivity. Returns recommendation to proceed, warn, or reject.\n\nUse this BEFORE paying an invoice to ensure safety.\n\nExample: fiber_validate_invoice({ invoice: \"fibt1...\" })\n\nReturns:\n- valid: boolean (overall validity)\n- details: parsed invoice details (amount, expiry, payment hash)\n- checks: individual validation results (format, expiry, amount, preimage, peer)\n- issues: list of warnings and critical issues found\n- recommendation: 'proceed' | 'warn' | 'reject'\n- reason: human-readable recommendation reason`,\n inputSchema: {\n type: 'object',\n properties: {\n invoice: {\n type: 'string',\n description: 'Invoice string to validate (starts with fibt or fibb)',\n },\n },\n required: ['invoice'],\n },\n },\n\n fiber_get_payment_proof: {\n name: 'fiber_get_payment_proof',\n description: `Get cryptographic proof of payment execution. Useful for audit trail and reconciliation.\n\nExample: fiber_get_payment_proof({ paymentHash: \"0x...\" })\n\nReturns stored payment proof including:\n- Invoice original\n- Preimage (if available)\n- Fee breakdown\n- Verification status\n- Proof metadata`,\n inputSchema: {\n type: 'object',\n properties: {\n paymentHash: {\n type: 'string',\n description: 'Payment hash to retrieve proof for',\n },\n },\n required: ['paymentHash'],\n },\n },\n\n fiber_analyze_liquidity: {\n name: 'fiber_analyze_liquidity',\n description: `Comprehensive liquidity analysis across all channels. Provides health metrics,\nidentifies issues, and generates recommendations for rebalancing and funding.\n\nUse this to:\n- Understand current channel health\n- Identify liquidity gaps\n- Get rebalancing recommendations\n- Estimate available runway\n\nNo parameters required.\n\nReturns:\n- balance: total, available to send/receive\n- channels: health metrics for each channel\n- liquidity: gaps and runway estimation\n- recommendations: rebalance suggestions and funding needs\n- summary: human-readable status`,\n inputSchema: {\n type: 'object',\n properties: {},\n },\n },\n\n fiber_can_send: {\n name: 'fiber_can_send',\n description: `Check if you have enough liquidity to send a specific amount. Returns shortfall \nif insufficient and recommendations.\n\nUse this BEFORE attempting a payment to verify you have enough liquidity.\n\nExample: fiber_can_send({ amountCkb: 100 })\n\nReturns:\n- canSend: boolean\n- shortfallCkb: missing amount (0 if can send)\n- availableCkb: current available balance\n- recommendation: what to do if insufficient`,\n inputSchema: {\n type: 'object',\n properties: {\n amountCkb: {\n type: 'number',\n description: 'Amount in CKB to check',\n },\n },\n required: ['amountCkb'],\n },\n },\n\n fiber_create_hold_invoice: {\n name: 'fiber_create_hold_invoice',\n description: `Create a hold invoice for escrow or conditional payments.\n \nA hold invoice locks the payer's funds until you explicitly settle with the preimage,\nor the invoice expires. This enables escrow patterns without a trusted third party.\n\nExample: fiber_create_hold_invoice({ \n amountCkb: 10, \n paymentHash: \"0x...\", \n description: \"Escrow for service delivery\" \n})\n\nFlow:\n1. Generate a secret preimage and compute its SHA-256 hash\n2. Create hold invoice with the hash\n3. Share invoice with payer — their funds are held when they pay\n4. When conditions are met, call fiber_settle_invoice with the preimage\n5. If conditions are NOT met, let the invoice expire (funds return to payer)\n\nReturns invoice string and payment hash.`,\n inputSchema: {\n type: 'object',\n properties: {\n amountCkb: {\n type: 'number',\n description: 'Amount to receive in CKB',\n },\n paymentHash: {\n type: 'string',\n description: 'SHA-256 hash of your secret preimage (0x-prefixed hex)',\n },\n description: {\n type: 'string',\n description: 'Description for the payer',\n },\n expiryMinutes: {\n type: 'number',\n description: 'Invoice expiry time in minutes (default: 60)',\n },\n },\n required: ['amountCkb', 'paymentHash'],\n },\n },\n\n fiber_settle_invoice: {\n name: 'fiber_settle_invoice',\n description: `Settle a hold invoice by revealing the preimage.\n \nThis releases the held funds to you. Only call this after conditions are met.\nThe preimage must hash (SHA-256) to the payment_hash used when creating the hold invoice.\n\nExample: fiber_settle_invoice({ \n paymentHash: \"0x...\", \n preimage: \"0x...\" \n})`,\n inputSchema: {\n type: 'object',\n properties: {\n paymentHash: {\n type: 'string',\n description: 'Payment hash of the hold invoice',\n },\n preimage: {\n type: 'string',\n description: 'Secret preimage (0x-prefixed hex, 32 bytes)',\n },\n },\n required: ['paymentHash', 'preimage'],\n },\n },\n\n fiber_wait_for_payment: {\n name: 'fiber_wait_for_payment',\n description: `Wait for a payment to complete (reach Success or Failed status).\n \nPolls the payment status until it reaches a terminal state. Useful after sending\na payment to wait for confirmation.\n\nExample: fiber_wait_for_payment({ paymentHash: \"0x...\", timeoutMs: 60000 })\n\nReturns the final payment status.`,\n inputSchema: {\n type: 'object',\n properties: {\n paymentHash: {\n type: 'string',\n description: 'Payment hash to wait for',\n },\n timeoutMs: {\n type: 'number',\n description: 'Timeout in milliseconds (default: 120000 = 2 min)',\n },\n },\n required: ['paymentHash'],\n },\n },\n\n fiber_wait_for_channel_ready: {\n name: 'fiber_wait_for_channel_ready',\n description: `Wait for a channel to become ready after opening.\n \nAfter opening a channel, it takes time for the funding transaction to be confirmed\non-chain. This tool polls until the channel reaches ChannelReady state.\n\nExample: fiber_wait_for_channel_ready({ channelId: \"0x...\", timeoutMs: 300000 })\n\nReturns channel info once ready.`,\n inputSchema: {\n type: 'object',\n properties: {\n channelId: {\n type: 'string',\n description: 'Channel ID to wait for',\n },\n timeoutMs: {\n type: 'number',\n description: 'Timeout in milliseconds (default: 300000 = 5 min)',\n },\n },\n required: ['channelId'],\n },\n },\n} as const;\n\n// =============================================================================\n// Type Helpers\n// =============================================================================\n\nexport type McpToolName = keyof typeof MCP_TOOLS;\ntype EmptyInput = Record<string, never>;\n\nexport type McpToolInput<T extends McpToolName> = T extends 'fiber_pay'\n ? {\n invoice?: string;\n recipientNodeId?: string;\n amountCkb?: number;\n maxFeeCkb?: number;\n customRecords?: Record<string, string>;\n maxParts?: number;\n }\n : T extends 'fiber_create_invoice'\n ? { amountCkb: number; description?: string; expiryMinutes?: number }\n : T extends 'fiber_get_balance'\n ? EmptyInput\n : T extends 'fiber_get_payment_status'\n ? { paymentHash: string }\n : T extends 'fiber_get_invoice_status'\n ? { paymentHash: string }\n : T extends 'fiber_list_channels'\n ? EmptyInput\n : T extends 'fiber_open_channel'\n ? { peer: string; fundingCkb: number; isPublic?: boolean }\n : T extends 'fiber_close_channel'\n ? { channelId: string; force?: boolean }\n : T extends 'fiber_get_node_info'\n ? EmptyInput\n : T extends 'fiber_get_spending_allowance'\n ? EmptyInput\n : T extends 'fiber_download_binary'\n ? { version?: string; force?: boolean }\n : T extends 'fiber_validate_invoice'\n ? { invoice: string }\n : T extends 'fiber_get_payment_proof'\n ? { paymentHash: string }\n : T extends 'fiber_analyze_liquidity'\n ? EmptyInput\n : T extends 'fiber_can_send'\n ? { amountCkb: number }\n : T extends 'fiber_create_hold_invoice'\n ? {\n amountCkb: number;\n paymentHash: string;\n description?: string;\n expiryMinutes?: number;\n }\n : T extends 'fiber_settle_invoice'\n ? { paymentHash: string; preimage: string }\n : T extends 'fiber_wait_for_payment'\n ? { paymentHash: string; timeoutMs?: number }\n : T extends 'fiber_wait_for_channel_ready'\n ? { channelId: string; timeoutMs?: number }\n : never;\n\nexport type McpToolResult<T extends McpToolName> = T extends 'fiber_pay'\n ? AgentResult<PaymentResult>\n : T extends 'fiber_create_invoice'\n ? AgentResult<InvoiceResult>\n : T extends 'fiber_get_balance'\n ? AgentResult<BalanceInfo>\n : T extends 'fiber_get_payment_status'\n ? AgentResult<PaymentResult>\n : T extends 'fiber_get_invoice_status'\n ? AgentResult<InvoiceResult>\n : T extends 'fiber_list_channels'\n ? AgentResult<ChannelSummary[]>\n : T extends 'fiber_open_channel'\n ? AgentResult<{ channelId: string }>\n : T extends 'fiber_close_channel'\n ? AgentResult<void>\n : T extends 'fiber_get_node_info'\n ? AgentResult<{\n nodeId: string;\n publicKey: string;\n version: string;\n channelCount: number;\n peersCount: number;\n }>\n : T extends 'fiber_get_spending_allowance'\n ? { perTransactionCkb: number; perWindowCkb: number }\n : T extends 'fiber_download_binary'\n ? AgentResult<{\n path: string;\n version: string;\n platform: string;\n arch: string;\n }>\n : T extends 'fiber_validate_invoice'\n ? AgentResult<import('./fiber-pay.js').InvoiceValidationResult>\n : T extends 'fiber_get_payment_proof'\n ? AgentResult<{\n proof: import('./fiber-pay.js').PaymentProof | null;\n verified: boolean;\n status: string;\n }>\n : T extends 'fiber_analyze_liquidity'\n ? AgentResult<import('./fiber-pay.js').LiquidityAnalysisResult>\n : T extends 'fiber_can_send'\n ? AgentResult<{\n canSend: boolean;\n shortfallCkb: number;\n availableCkb: number;\n recommendation: string;\n }>\n : T extends 'fiber_create_hold_invoice'\n ? AgentResult<HoldInvoiceResult>\n : T extends 'fiber_settle_invoice'\n ? AgentResult<void>\n : T extends 'fiber_wait_for_payment'\n ? AgentResult<PaymentResult>\n : T extends 'fiber_wait_for_channel_ready'\n ? AgentResult<ChannelSummary>\n : never;\n"],"mappings":";AAyBO,IAAM,YAAY;AAAA,EACvB,WAAW;AAAA,IACT,MAAM;AAAA,IACN,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOb,aAAa;AAAA,MACX,MAAM;AAAA,MACN,YAAY;AAAA,QACV,SAAS;AAAA,UACP,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA,iBAAiB;AAAA,UACf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AA;AAAA;AAAA;AAAA,IAQb,aAAa;AAAA,MACX,MAAM;AAAA,MACN,YAAY;AAAA,QACV,aAAa;AAAA,UACX,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA,WAAW;AAAA,UACT,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,MACF;AAAA,MACA,UAAU,CAAC,aAAa;AAAA,IAC1B;AAAA,EACF;AAAA,EAEA,8BAA8B;AAAA,IAC5B,MAAM;AAAA,IACN,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQb,aAAa;AAAA,MACX,MAAM;AAAA,MACN,YAAY;AAAA,QACV,WAAW;AAAA,UACT,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA,WAAW;AAAA,UACT,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,MACF;AAAA,MACA,UAAU,CAAC,WAAW;AAAA,IACxB;AAAA,EACF;AACF;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fiber-pay/agent",
|
|
3
|
+
"version": "0.1.0-rc.1",
|
|
4
|
+
"description": "AI agent orchestration layer for Fiber Network with MCP tools",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./mcp": {
|
|
14
|
+
"import": "./dist/mcp-tools.js",
|
|
15
|
+
"types": "./dist/mcp-tools.d.ts"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"ckb",
|
|
24
|
+
"lightning",
|
|
25
|
+
"fiber",
|
|
26
|
+
"ai-agent",
|
|
27
|
+
"mcp",
|
|
28
|
+
"nervos"
|
|
29
|
+
],
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=20"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@fiber-pay/sdk": "0.1.0-rc.1",
|
|
39
|
+
"@fiber-pay/runtime": "0.1.0-rc.1",
|
|
40
|
+
"@fiber-pay/node": "0.1.0-rc.1"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsup",
|
|
44
|
+
"dev": "tsup --watch",
|
|
45
|
+
"typecheck": "tsc --noEmit"
|
|
46
|
+
}
|
|
47
|
+
}
|