@guiie/buda-mcp 1.5.0 → 1.5.2

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 (123) hide show
  1. package/.cursor/rules/marketplace-docs-sync.mdc +32 -0
  2. package/CHANGELOG.md +75 -0
  3. package/PUBLISH_CHECKLIST.md +48 -89
  4. package/README.md +446 -78
  5. package/dist/audit.d.ts +21 -0
  6. package/dist/audit.d.ts.map +1 -0
  7. package/dist/audit.js +14 -0
  8. package/dist/client.d.ts +1 -0
  9. package/dist/client.d.ts.map +1 -1
  10. package/dist/client.js +2 -1
  11. package/dist/http.js +65 -7
  12. package/dist/index.js +12 -3
  13. package/dist/tools/account.js +1 -1
  14. package/dist/tools/arbitrage.js +1 -1
  15. package/dist/tools/balance.js +1 -1
  16. package/dist/tools/balances.js +1 -1
  17. package/dist/tools/banks.js +1 -1
  18. package/dist/tools/batch_orders.d.ts +6 -1
  19. package/dist/tools/batch_orders.d.ts.map +1 -1
  20. package/dist/tools/batch_orders.js +47 -3
  21. package/dist/tools/cancel_all_orders.d.ts +1 -1
  22. package/dist/tools/cancel_all_orders.d.ts.map +1 -1
  23. package/dist/tools/cancel_all_orders.js +10 -13
  24. package/dist/tools/cancel_order.d.ts +1 -1
  25. package/dist/tools/cancel_order.d.ts.map +1 -1
  26. package/dist/tools/cancel_order.js +10 -10
  27. package/dist/tools/cancel_order_by_client_id.d.ts +1 -1
  28. package/dist/tools/cancel_order_by_client_id.d.ts.map +1 -1
  29. package/dist/tools/cancel_order_by_client_id.js +9 -9
  30. package/dist/tools/compare_markets.d.ts +9 -0
  31. package/dist/tools/compare_markets.d.ts.map +1 -1
  32. package/dist/tools/compare_markets.js +63 -53
  33. package/dist/tools/dead_mans_switch.d.ts +2 -2
  34. package/dist/tools/dead_mans_switch.d.ts.map +1 -1
  35. package/dist/tools/dead_mans_switch.js +68 -6
  36. package/dist/tools/deposits.js +2 -2
  37. package/dist/tools/fees.js +1 -1
  38. package/dist/tools/lightning.d.ts +1 -1
  39. package/dist/tools/lightning.d.ts.map +1 -1
  40. package/dist/tools/lightning.js +25 -9
  41. package/dist/tools/market_sentiment.js +1 -1
  42. package/dist/tools/market_summary.js +1 -1
  43. package/dist/tools/markets.js +1 -1
  44. package/dist/tools/order_lookup.js +2 -2
  45. package/dist/tools/orderbook.js +1 -1
  46. package/dist/tools/orders.js +1 -1
  47. package/dist/tools/place_order.d.ts +1 -1
  48. package/dist/tools/place_order.d.ts.map +1 -1
  49. package/dist/tools/place_order.js +53 -4
  50. package/dist/tools/price_history.js +1 -1
  51. package/dist/tools/quotation.js +1 -1
  52. package/dist/tools/receive_addresses.d.ts +6 -1
  53. package/dist/tools/receive_addresses.d.ts.map +1 -1
  54. package/dist/tools/receive_addresses.js +37 -13
  55. package/dist/tools/remittance_recipients.js +2 -2
  56. package/dist/tools/remittances.d.ts +7 -2
  57. package/dist/tools/remittances.d.ts.map +1 -1
  58. package/dist/tools/remittances.js +46 -23
  59. package/dist/tools/simulate_order.js +1 -1
  60. package/dist/tools/spread.js +1 -1
  61. package/dist/tools/technical_indicators.d.ts.map +1 -1
  62. package/dist/tools/technical_indicators.js +3 -2
  63. package/dist/tools/ticker.js +1 -1
  64. package/dist/tools/trades.js +1 -1
  65. package/dist/tools/volume.js +1 -1
  66. package/dist/tools/withdrawals.d.ts +1 -1
  67. package/dist/tools/withdrawals.d.ts.map +1 -1
  68. package/dist/tools/withdrawals.js +21 -11
  69. package/dist/utils.d.ts +10 -0
  70. package/dist/utils.d.ts.map +1 -1
  71. package/dist/utils.js +29 -1
  72. package/dist/validation.d.ts +6 -0
  73. package/dist/validation.d.ts.map +1 -1
  74. package/dist/validation.js +26 -0
  75. package/dist/version.d.ts.map +1 -1
  76. package/dist/version.js +8 -1
  77. package/marketplace/README.md +1 -1
  78. package/marketplace/claude-listing.md +75 -4
  79. package/marketplace/gemini-tools.json +325 -2
  80. package/marketplace/openapi.yaml +160 -1
  81. package/package.json +2 -1
  82. package/server.json +2 -2
  83. package/src/audit.ts +24 -0
  84. package/src/client.ts +3 -1
  85. package/src/http.ts +75 -7
  86. package/src/index.ts +10 -3
  87. package/src/tools/account.ts +1 -1
  88. package/src/tools/arbitrage.ts +1 -1
  89. package/src/tools/balance.ts +1 -1
  90. package/src/tools/balances.ts +1 -1
  91. package/src/tools/banks.ts +1 -1
  92. package/src/tools/batch_orders.ts +52 -2
  93. package/src/tools/cancel_all_orders.ts +10 -12
  94. package/src/tools/cancel_order.ts +10 -9
  95. package/src/tools/cancel_order_by_client_id.ts +9 -8
  96. package/src/tools/compare_markets.ts +78 -61
  97. package/src/tools/dead_mans_switch.ts +76 -5
  98. package/src/tools/deposits.ts +2 -2
  99. package/src/tools/fees.ts +1 -1
  100. package/src/tools/lightning.ts +28 -9
  101. package/src/tools/market_sentiment.ts +1 -1
  102. package/src/tools/market_summary.ts +1 -1
  103. package/src/tools/markets.ts +1 -1
  104. package/src/tools/order_lookup.ts +2 -2
  105. package/src/tools/orderbook.ts +1 -1
  106. package/src/tools/orders.ts +1 -1
  107. package/src/tools/place_order.ts +56 -5
  108. package/src/tools/price_history.ts +1 -1
  109. package/src/tools/quotation.ts +1 -1
  110. package/src/tools/receive_addresses.ts +40 -13
  111. package/src/tools/remittance_recipients.ts +2 -2
  112. package/src/tools/remittances.ts +49 -22
  113. package/src/tools/simulate_order.ts +1 -1
  114. package/src/tools/spread.ts +1 -1
  115. package/src/tools/technical_indicators.ts +3 -2
  116. package/src/tools/ticker.ts +1 -1
  117. package/src/tools/trades.ts +1 -1
  118. package/src/tools/volume.ts +1 -1
  119. package/src/tools/withdrawals.ts +22 -10
  120. package/src/utils.ts +36 -1
  121. package/src/validation.ts +29 -0
  122. package/src/version.ts +11 -3
  123. package/test/unit.ts +623 -22
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { BudaApiError } from "../client.js";
3
3
  import { CACHE_TTL } from "../cache.js";
4
+ import { validateCurrency } from "../validation.js";
4
5
  export const toolSchema = {
5
6
  name: "compare_markets",
6
7
  description: "Returns side-by-side ticker data for all trading pairs of a given base currency across Buda.com's " +
@@ -18,63 +19,72 @@ export const toolSchema = {
18
19
  required: ["base_currency"],
19
20
  },
20
21
  };
22
+ export async function handleCompareMarkets(args, client, cache) {
23
+ const { base_currency } = args;
24
+ const currencyError = validateCurrency(base_currency);
25
+ if (currencyError) {
26
+ return {
27
+ content: [{ type: "text", text: JSON.stringify({ error: currencyError, code: "INVALID_CURRENCY" }) }],
28
+ isError: true,
29
+ };
30
+ }
31
+ try {
32
+ const base = base_currency.toUpperCase();
33
+ const data = await cache.getOrFetch("tickers:all", CACHE_TTL.TICKER, () => client.get("/tickers"));
34
+ const matching = data.tickers.filter((t) => {
35
+ const [tickerBase] = t.market_id.split("-");
36
+ return tickerBase === base;
37
+ });
38
+ if (matching.length === 0) {
39
+ return {
40
+ content: [
41
+ {
42
+ type: "text",
43
+ text: JSON.stringify({
44
+ error: `No markets found for base currency '${base}'.`,
45
+ code: "NOT_FOUND",
46
+ }),
47
+ },
48
+ ],
49
+ isError: true,
50
+ };
51
+ }
52
+ const result = {
53
+ base_currency: base,
54
+ markets: matching.map((t) => ({
55
+ market_id: t.market_id,
56
+ last_price: parseFloat(t.last_price[0]),
57
+ last_price_currency: t.last_price[1],
58
+ best_bid: t.max_bid ? parseFloat(t.max_bid[0]) : null,
59
+ best_ask: t.min_ask ? parseFloat(t.min_ask[0]) : null,
60
+ volume_24h: t.volume ? parseFloat(t.volume[0]) : null,
61
+ price_change_24h: t.price_variation_24h
62
+ ? parseFloat((parseFloat(t.price_variation_24h) * 100).toFixed(4))
63
+ : null,
64
+ price_change_7d: t.price_variation_7d
65
+ ? parseFloat((parseFloat(t.price_variation_7d) * 100).toFixed(4))
66
+ : null,
67
+ })),
68
+ };
69
+ return {
70
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
71
+ };
72
+ }
73
+ catch (err) {
74
+ const msg = err instanceof BudaApiError
75
+ ? { error: err.message, code: err.status }
76
+ : { error: String(err), code: "UNKNOWN" };
77
+ return {
78
+ content: [{ type: "text", text: JSON.stringify(msg) }],
79
+ isError: true,
80
+ };
81
+ }
82
+ }
21
83
  export function register(server, client, cache) {
22
84
  server.tool(toolSchema.name, toolSchema.description, {
23
85
  base_currency: z
24
86
  .string()
25
87
  .describe("Base currency to compare across all available markets (e.g. 'BTC', 'ETH', 'XRP')."),
26
- }, async ({ base_currency }) => {
27
- try {
28
- const base = base_currency.toUpperCase();
29
- const data = await cache.getOrFetch("tickers:all", CACHE_TTL.TICKER, () => client.get("/tickers"));
30
- const matching = data.tickers.filter((t) => {
31
- const [tickerBase] = t.market_id.split("-");
32
- return tickerBase === base;
33
- });
34
- if (matching.length === 0) {
35
- return {
36
- content: [
37
- {
38
- type: "text",
39
- text: JSON.stringify({
40
- error: `No markets found for base currency '${base}'.`,
41
- code: "NOT_FOUND",
42
- }),
43
- },
44
- ],
45
- isError: true,
46
- };
47
- }
48
- const result = {
49
- base_currency: base,
50
- markets: matching.map((t) => ({
51
- market_id: t.market_id,
52
- last_price: parseFloat(t.last_price[0]),
53
- last_price_currency: t.last_price[1],
54
- best_bid: t.max_bid ? parseFloat(t.max_bid[0]) : null,
55
- best_ask: t.min_ask ? parseFloat(t.min_ask[0]) : null,
56
- volume_24h: t.volume ? parseFloat(t.volume[0]) : null,
57
- price_change_24h: t.price_variation_24h
58
- ? parseFloat((parseFloat(t.price_variation_24h) * 100).toFixed(4))
59
- : null,
60
- price_change_7d: t.price_variation_7d
61
- ? parseFloat((parseFloat(t.price_variation_7d) * 100).toFixed(4))
62
- : null,
63
- })),
64
- };
65
- return {
66
- content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
67
- };
68
- }
69
- catch (err) {
70
- const msg = err instanceof BudaApiError
71
- ? { error: err.message, code: err.status, path: err.path }
72
- : { error: String(err), code: "UNKNOWN" };
73
- return {
74
- content: [{ type: "text", text: JSON.stringify(msg) }],
75
- isError: true,
76
- };
77
- }
78
- });
88
+ }, (args) => handleCompareMarkets(args, client, cache));
79
89
  }
80
90
  //# sourceMappingURL=compare_markets.js.map
@@ -55,7 +55,7 @@ type ScheduleArgs = {
55
55
  ttl_seconds: number;
56
56
  confirmation_token: string;
57
57
  };
58
- export declare function handleScheduleCancelAll(args: ScheduleArgs, client: BudaClient): Promise<{
58
+ export declare function handleScheduleCancelAll(args: ScheduleArgs, client: BudaClient, transport?: "http" | "stdio"): Promise<{
59
59
  content: Array<{
60
60
  type: "text";
61
61
  text: string;
@@ -79,6 +79,6 @@ export declare function handleDisarmCancelTimer({ market_id }: MarketOnlyArgs):
79
79
  }>;
80
80
  isError?: boolean;
81
81
  };
82
- export declare function register(server: McpServer, client: BudaClient): void;
82
+ export declare function register(server: McpServer, client: BudaClient, transport?: "stdio" | "http"): void;
83
83
  export {};
84
84
  //# sourceMappingURL=dead_mans_switch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dead_mans_switch.d.ts","sourceRoot":"","sources":["../../src/tools/dead_mans_switch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AAiDxD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CA2BtB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;CAgB3B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;CAgB5B,CAAC;AAIF,KAAK,YAAY,GAAG;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC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,EAClB,MAAM,EAAE,UAAU,EAClB,SAAS,GAAE,MAAM,GAAG,OAAiB,GACpC,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CA+DhF;AAED,KAAK,cAAc,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5C,wBAAgB,sBAAsB,CACpC,EAAE,SAAS,EAAE,EAAE,cAAc,EAC7B,MAAM,EAAE,UAAU,GACjB;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CA0CvE;AAED,wBAAgB,uBAAuB,CACrC,EAAE,SAAS,EAAE,EAAE,cAAc,GAC5B;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAwCvE;AAID,wBAAgB,QAAQ,CACtB,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,UAAU,EAClB,SAAS,GAAE,OAAO,GAAG,MAAgB,GACpC,IAAI,CA2FN"}
@@ -1,11 +1,12 @@
1
1
  import { z } from "zod";
2
2
  import { validateMarketId } from "../validation.js";
3
+ import { logAudit } from "../audit.js";
3
4
  const timers = new Map();
4
5
  async function cancelAllOrdersForMarket(marketId, client) {
5
6
  try {
6
7
  const data = await client.get(`/markets/${marketId}/orders`, { state: "pending", per: 300 });
7
8
  const orders = data.orders ?? [];
8
- await Promise.allSettled(orders.map((order) => client.put(`/orders/${order.id}`, { state: "canceling" })));
9
+ await Promise.allSettled(orders.map((order) => client.put(`/orders/${order.id}`, { order: { state: "canceling" } })));
9
10
  timers.delete(marketId);
10
11
  }
11
12
  catch {
@@ -85,7 +86,7 @@ export const disarmToolSchema = {
85
86
  required: ["market_id"],
86
87
  },
87
88
  };
88
- export async function handleScheduleCancelAll(args, client) {
89
+ export async function handleScheduleCancelAll(args, client, transport = "stdio") {
89
90
  const { market_id, ttl_seconds, confirmation_token } = args;
90
91
  if (confirmation_token !== "CONFIRM") {
91
92
  return {
@@ -111,8 +112,23 @@ export async function handleScheduleCancelAll(args, client) {
111
112
  isError: true,
112
113
  };
113
114
  }
115
+ if (!Number.isInteger(ttl_seconds) || ttl_seconds < 10 || ttl_seconds > 300) {
116
+ return {
117
+ content: [
118
+ {
119
+ type: "text",
120
+ text: JSON.stringify({
121
+ error: "ttl_seconds must be an integer between 10 and 300.",
122
+ code: "VALIDATION_ERROR",
123
+ }),
124
+ },
125
+ ],
126
+ isError: true,
127
+ };
128
+ }
114
129
  const id = market_id.toLowerCase();
115
130
  const entry = armTimer(id, ttl_seconds, client);
131
+ logAudit({ ts: new Date().toISOString(), tool: "schedule_cancel_all", transport, args_summary: { market_id: market_id.toUpperCase(), ttl_seconds }, success: true });
116
132
  return {
117
133
  content: [
118
134
  {
@@ -207,7 +223,7 @@ export function handleDisarmCancelTimer({ market_id }) {
207
223
  };
208
224
  }
209
225
  // ---- Registration ----
210
- export function register(server, client) {
226
+ export function register(server, client, transport = "stdio") {
211
227
  server.tool(toolSchema.name, toolSchema.description, {
212
228
  market_id: z
213
229
  .string()
@@ -221,16 +237,62 @@ export function register(server, client) {
221
237
  confirmation_token: z
222
238
  .string()
223
239
  .describe("Must equal exactly 'CONFIRM' (case-sensitive) to arm the switch."),
224
- }, (args) => handleScheduleCancelAll(args, client));
240
+ }, (args) => {
241
+ if (transport === "http") {
242
+ return Promise.resolve({
243
+ content: [{
244
+ type: "text",
245
+ text: JSON.stringify({
246
+ error: "schedule_cancel_all is not available on the HTTP transport. " +
247
+ "Timer state is lost on every server restart or deploy. " +
248
+ "Run buda-mcp in stdio mode on a persistent local process to use this feature.",
249
+ code: "TRANSPORT_NOT_SUPPORTED",
250
+ }),
251
+ }],
252
+ isError: true,
253
+ });
254
+ }
255
+ return handleScheduleCancelAll(args, client);
256
+ });
225
257
  server.tool(renewToolSchema.name, renewToolSchema.description, {
226
258
  market_id: z
227
259
  .string()
228
260
  .describe("Market ID whose timer should be renewed (e.g. 'BTC-CLP')."),
229
- }, (args) => handleRenewCancelTimer(args, client));
261
+ }, (args) => {
262
+ if (transport === "http") {
263
+ return Promise.resolve({
264
+ content: [{
265
+ type: "text",
266
+ text: JSON.stringify({
267
+ error: "renew_cancel_timer is not available on the HTTP transport. " +
268
+ "Timer state is process-local and only meaningful in stdio mode on a persistent local process.",
269
+ code: "TRANSPORT_NOT_SUPPORTED",
270
+ }),
271
+ }],
272
+ isError: true,
273
+ });
274
+ }
275
+ return Promise.resolve(handleRenewCancelTimer(args, client));
276
+ });
230
277
  server.tool(disarmToolSchema.name, disarmToolSchema.description, {
231
278
  market_id: z
232
279
  .string()
233
280
  .describe("Market ID whose timer should be disarmed (e.g. 'BTC-CLP')."),
234
- }, (args) => handleDisarmCancelTimer(args));
281
+ }, (args) => {
282
+ if (transport === "http") {
283
+ return Promise.resolve({
284
+ content: [{
285
+ type: "text",
286
+ text: JSON.stringify({
287
+ error: "disarm_cancel_timer is not available on the HTTP transport. " +
288
+ "Timer state is process-local and only meaningful in stdio mode on a persistent local process.",
289
+ code: "TRANSPORT_NOT_SUPPORTED",
290
+ }),
291
+ }],
292
+ isError: true,
293
+ });
294
+ }
295
+ return Promise.resolve(handleDisarmCancelTimer(args));
296
+ });
235
297
  }
236
298
  //# sourceMappingURL=dead_mans_switch.js.map
@@ -80,7 +80,7 @@ export async function handleGetDepositHistory(args, client) {
80
80
  }
81
81
  catch (err) {
82
82
  const msg = err instanceof BudaApiError
83
- ? { error: err.message, code: err.status, path: err.path }
83
+ ? { error: err.message, code: err.status }
84
84
  : { error: String(err), code: "UNKNOWN" };
85
85
  return {
86
86
  content: [{ type: "text", text: JSON.stringify(msg) }],
@@ -144,7 +144,7 @@ export async function handleCreateFiatDeposit(args, client) {
144
144
  }
145
145
  catch (err) {
146
146
  const msg = err instanceof BudaApiError
147
- ? { error: err.message, code: err.status, path: err.path }
147
+ ? { error: err.message, code: err.status }
148
148
  : { error: String(err), code: "UNKNOWN" };
149
149
  return {
150
150
  content: [{ type: "text", text: JSON.stringify(msg) }],
@@ -55,7 +55,7 @@ export async function handleGetNetworkFees(args, client) {
55
55
  }
56
56
  catch (err) {
57
57
  const msg = err instanceof BudaApiError
58
- ? { error: err.message, code: err.status, path: err.path }
58
+ ? { error: err.message, code: err.status }
59
59
  : { error: String(err), code: "UNKNOWN" };
60
60
  return {
61
61
  content: [{ type: "text", text: JSON.stringify(msg) }],
@@ -49,7 +49,7 @@ type CreateLightningInvoiceArgs = {
49
49
  description?: string;
50
50
  expiry_seconds?: number;
51
51
  };
52
- export declare function handleLightningWithdrawal(args: LightningWithdrawalArgs, client: BudaClient): Promise<{
52
+ export declare function handleLightningWithdrawal(args: LightningWithdrawalArgs, client: BudaClient, transport?: "http" | "stdio"): Promise<{
53
53
  content: Array<{
54
54
  type: "text";
55
55
  text: string;
@@ -1 +1 @@
1
- {"version":3,"file":"lightning.d.ts","sourceRoot":"","sources":["../../src/tools/lightning.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AAIxD,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;CAuBzC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;CAwB5C,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,KAAK,0BAA0B,GAAG;IAChC,eAAe,EAAE,MAAM,CAAC;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AC;AAEF,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,uBAAuB,EAC7B,MAAM,EAAE,UAAU,EAClB,SAAS,GAAE,MAAM,GAAG,OAAiB,GACpC,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAgFhF;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,0BAA0B,EAChC,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CA8ChF;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CA2CpE"}
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { BudaApiError } from "../client.js";
3
3
  import { flattenAmount } from "../utils.js";
4
+ import { logAudit } from "../audit.js";
4
5
  export const lightningWithdrawalToolSchema = {
5
6
  name: "lightning_withdrawal",
6
7
  description: "Pay a Bitcoin Lightning Network invoice from your Buda.com LN-BTC reserve. " +
@@ -47,7 +48,7 @@ export const createLightningInvoiceToolSchema = {
47
48
  required: ["amount_satoshis"],
48
49
  },
49
50
  };
50
- export async function handleLightningWithdrawal(args, client) {
51
+ export async function handleLightningWithdrawal(args, client, transport = "stdio") {
51
52
  const { invoice, confirmation_token } = args;
52
53
  if (confirmation_token !== "CONFIRM") {
53
54
  const preview = invoice.length > 20 ? invoice.substring(0, 20) + "..." : invoice;
@@ -66,12 +67,26 @@ export async function handleLightningWithdrawal(args, client) {
66
67
  isError: true,
67
68
  };
68
69
  }
70
+ const BOLT11_RE = /^ln(bc|tb|bcrt)\d*[munp]?1[a-z0-9]{20,}$/i;
71
+ if (!BOLT11_RE.test(invoice)) {
72
+ return {
73
+ content: [{
74
+ type: "text",
75
+ text: JSON.stringify({
76
+ error: "Invalid Lightning invoice format. " +
77
+ "Expected a BOLT-11 string starting with 'lnbc', 'lntb', or 'lnbcrt'.",
78
+ code: "INVALID_INVOICE",
79
+ }),
80
+ }],
81
+ isError: true,
82
+ };
83
+ }
69
84
  try {
70
85
  const data = await client.post(`/reserves/ln-btc/withdrawals`, { invoice });
71
86
  const lw = data.lightning_withdrawal;
72
87
  const amount = flattenAmount(lw.amount);
73
88
  const fee = flattenAmount(lw.fee);
74
- return {
89
+ const result = {
75
90
  content: [
76
91
  {
77
92
  type: "text",
@@ -88,15 +103,16 @@ export async function handleLightningWithdrawal(args, client) {
88
103
  },
89
104
  ],
90
105
  };
106
+ logAudit({ ts: new Date().toISOString(), tool: "lightning_withdrawal", transport, args_summary: {}, success: true });
107
+ return result;
91
108
  }
92
109
  catch (err) {
93
110
  const msg = err instanceof BudaApiError
94
- ? { error: err.message, code: err.status, path: err.path }
111
+ ? { error: err.message, code: err.status }
95
112
  : { error: String(err), code: "UNKNOWN" };
96
- return {
97
- content: [{ type: "text", text: JSON.stringify(msg) }],
98
- isError: true,
99
- };
113
+ const result = { content: [{ type: "text", text: JSON.stringify(msg) }], isError: true };
114
+ logAudit({ ts: new Date().toISOString(), tool: "lightning_withdrawal", transport, args_summary: {}, success: false, error_code: msg.code });
115
+ return result;
100
116
  }
101
117
  }
102
118
  export async function handleCreateLightningInvoice(args, client) {
@@ -129,7 +145,7 @@ export async function handleCreateLightningInvoice(args, client) {
129
145
  }
130
146
  catch (err) {
131
147
  const msg = err instanceof BudaApiError
132
- ? { error: err.message, code: err.status, path: err.path }
148
+ ? { error: err.message, code: err.status }
133
149
  : { error: String(err), code: "UNKNOWN" };
134
150
  return {
135
151
  content: [{ type: "text", text: JSON.stringify(msg) }],
@@ -141,7 +157,7 @@ export function register(server, client) {
141
157
  server.tool(lightningWithdrawalToolSchema.name, lightningWithdrawalToolSchema.description, {
142
158
  invoice: z
143
159
  .string()
144
- .min(1)
160
+ .min(50)
145
161
  .describe("BOLT-11 Lightning invoice string (starts with 'lnbc', 'lntb', etc.)."),
146
162
  confirmation_token: z
147
163
  .string()
@@ -86,7 +86,7 @@ export async function handleMarketSentiment({ market_id }, client, cache) {
86
86
  }
87
87
  catch (err) {
88
88
  const msg = err instanceof BudaApiError
89
- ? { error: err.message, code: err.status, path: err.path }
89
+ ? { error: err.message, code: err.status }
90
90
  : { error: String(err), code: "UNKNOWN" };
91
91
  return {
92
92
  content: [{ type: "text", text: JSON.stringify(msg) }],
@@ -63,7 +63,7 @@ export async function handleMarketSummary({ market_id }, client, cache) {
63
63
  }
64
64
  catch (err) {
65
65
  const msg = err instanceof BudaApiError
66
- ? { error: err.message, code: err.status, path: err.path }
66
+ ? { error: err.message, code: err.status }
67
67
  : { error: String(err), code: "UNKNOWN" };
68
68
  return {
69
69
  content: [{ type: "text", text: JSON.stringify(msg) }],
@@ -47,7 +47,7 @@ export function register(server, client, cache) {
47
47
  }
48
48
  catch (err) {
49
49
  const msg = err instanceof BudaApiError
50
- ? { error: err.message, code: err.status, path: err.path }
50
+ ? { error: err.message, code: err.status }
51
51
  : { error: String(err), code: "UNKNOWN" };
52
52
  return {
53
53
  content: [{ type: "text", text: JSON.stringify(msg) }],
@@ -76,7 +76,7 @@ export async function handleGetOrder(args, client) {
76
76
  }
77
77
  catch (err) {
78
78
  const msg = err instanceof BudaApiError
79
- ? { error: err.message, code: err.status, path: err.path }
79
+ ? { error: err.message, code: err.status }
80
80
  : { error: String(err), code: "UNKNOWN" };
81
81
  return {
82
82
  content: [{ type: "text", text: JSON.stringify(msg) }],
@@ -93,7 +93,7 @@ export async function handleGetOrderByClientId(args, client) {
93
93
  }
94
94
  catch (err) {
95
95
  const msg = err instanceof BudaApiError
96
- ? { error: err.message, code: err.status, path: err.path }
96
+ ? { error: err.message, code: err.status }
97
97
  : { error: String(err), code: "UNKNOWN" };
98
98
  return {
99
99
  content: [{ type: "text", text: JSON.stringify(msg) }],
@@ -66,7 +66,7 @@ export function register(server, client, cache) {
66
66
  }
67
67
  catch (err) {
68
68
  const msg = err instanceof BudaApiError
69
- ? { error: err.message, code: err.status, path: err.path }
69
+ ? { error: err.message, code: err.status }
70
70
  : { error: String(err), code: "UNKNOWN" };
71
71
  return {
72
72
  content: [{ type: "text", text: JSON.stringify(msg) }],
@@ -117,7 +117,7 @@ export function register(server, client) {
117
117
  }
118
118
  catch (err) {
119
119
  const msg = err instanceof BudaApiError
120
- ? { error: err.message, code: err.status, path: err.path }
120
+ ? { error: err.message, code: err.status }
121
121
  : { error: String(err), code: "UNKNOWN" };
122
122
  return {
123
123
  content: [{ type: "text", text: JSON.stringify(msg) }],
@@ -72,7 +72,7 @@ type PlaceOrderArgs = {
72
72
  stop_type?: ">=" | "<=";
73
73
  confirmation_token: string;
74
74
  };
75
- export declare function handlePlaceOrder(args: PlaceOrderArgs, client: BudaClient): Promise<{
75
+ export declare function handlePlaceOrder(args: PlaceOrderArgs, client: BudaClient, transport?: "http" | "stdio"): Promise<{
76
76
  content: Array<{
77
77
  type: "text";
78
78
  text: string;
@@ -1 +1 @@
1
- {"version":3,"file":"place_order.d.ts","sourceRoot":"","sources":["../../src/tools/place_order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AAIxD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEtB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,KAAK,GAAG,KAAK,CAAC;IACpB,UAAU,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CA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;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,UAAU,EAClB,SAAS,GAAE,MAAM,GAAG,OAAiB,GACpC,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAsLhF;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CA4DpE"}
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { BudaApiError } from "../client.js";
3
3
  import { validateMarketId } from "../validation.js";
4
+ import { logAudit } from "../audit.js";
4
5
  export const toolSchema = {
5
6
  name: "place_order",
6
7
  description: "Place a limit or market order on Buda.com. " +
@@ -66,7 +67,7 @@ export const toolSchema = {
66
67
  required: ["market_id", "type", "price_type", "amount", "confirmation_token"],
67
68
  },
68
69
  };
69
- export async function handlePlaceOrder(args, client) {
70
+ export async function handlePlaceOrder(args, client, transport = "stdio") {
70
71
  const { market_id, type, price_type, amount, limit_price, ioc, fok, post_only, gtd_timestamp, stop_price, stop_type, confirmation_token, } = args;
71
72
  if (confirmation_token !== "CONFIRM") {
72
73
  return {
@@ -145,6 +146,37 @@ export async function handlePlaceOrder(args, client) {
145
146
  isError: true,
146
147
  };
147
148
  }
149
+ if (gtd_timestamp !== undefined) {
150
+ const ts = new Date(gtd_timestamp).getTime();
151
+ if (isNaN(ts)) {
152
+ return {
153
+ content: [
154
+ {
155
+ type: "text",
156
+ text: JSON.stringify({
157
+ error: "gtd_timestamp must be a valid ISO 8601 datetime string.",
158
+ code: "VALIDATION_ERROR",
159
+ }),
160
+ },
161
+ ],
162
+ isError: true,
163
+ };
164
+ }
165
+ if (ts <= Date.now()) {
166
+ return {
167
+ content: [
168
+ {
169
+ type: "text",
170
+ text: JSON.stringify({
171
+ error: "gtd_timestamp must be a future datetime.",
172
+ code: "VALIDATION_ERROR",
173
+ }),
174
+ },
175
+ ],
176
+ isError: true,
177
+ };
178
+ }
179
+ }
148
180
  let limitType = "gtc";
149
181
  if (ioc)
150
182
  limitType = "ioc";
@@ -163,18 +195,35 @@ export async function handlePlaceOrder(args, client) {
163
195
  payload.stop = { price: stop_price, type: stop_type };
164
196
  }
165
197
  const data = await client.post(`/markets/${market_id.toLowerCase()}/orders`, payload);
166
- return {
198
+ const result = {
167
199
  content: [{ type: "text", text: JSON.stringify(data.order, null, 2) }],
168
200
  };
201
+ logAudit({
202
+ ts: new Date().toISOString(),
203
+ tool: "place_order",
204
+ transport,
205
+ args_summary: { market_id, type, price_type, amount },
206
+ success: true,
207
+ });
208
+ return result;
169
209
  }
170
210
  catch (err) {
171
211
  const msg = err instanceof BudaApiError
172
- ? { error: err.message, code: err.status, path: err.path }
212
+ ? { error: err.message, code: err.status }
173
213
  : { error: String(err), code: "UNKNOWN" };
174
- return {
214
+ const result = {
175
215
  content: [{ type: "text", text: JSON.stringify(msg) }],
176
216
  isError: true,
177
217
  };
218
+ logAudit({
219
+ ts: new Date().toISOString(),
220
+ tool: "place_order",
221
+ transport,
222
+ args_summary: { market_id, type, price_type, amount },
223
+ success: false,
224
+ error_code: msg.code,
225
+ });
226
+ return result;
178
227
  }
179
228
  }
180
229
  export function register(server, client) {
@@ -85,7 +85,7 @@ export function register(server, client, _cache) {
85
85
  }
86
86
  catch (err) {
87
87
  const msg = err instanceof BudaApiError
88
- ? { error: err.message, code: err.status, path: err.path }
88
+ ? { error: err.message, code: err.status }
89
89
  : { error: String(err), code: "UNKNOWN" };
90
90
  return {
91
91
  content: [{ type: "text", text: JSON.stringify(msg) }],
@@ -80,7 +80,7 @@ export async function handleGetRealQuotation(args, client) {
80
80
  }
81
81
  catch (err) {
82
82
  const msg = err instanceof BudaApiError
83
- ? { error: err.message, code: err.status, path: err.path }
83
+ ? { error: err.message, code: err.status }
84
84
  : { error: String(err), code: "UNKNOWN" };
85
85
  return {
86
86
  content: [{ type: "text", text: JSON.stringify(msg) }],
@@ -10,6 +10,10 @@ export declare const createReceiveAddressToolSchema: {
10
10
  type: string;
11
11
  description: string;
12
12
  };
13
+ confirmation_token: {
14
+ type: string;
15
+ description: string;
16
+ };
13
17
  };
14
18
  required: string[];
15
19
  };
@@ -67,7 +71,8 @@ export declare function handleGetReceiveAddress(args: {
67
71
  }>;
68
72
  export declare function handleCreateReceiveAddress(args: {
69
73
  currency: string;
70
- }, client: BudaClient): Promise<{
74
+ confirmation_token: string;
75
+ }, client: BudaClient, transport?: "http" | "stdio"): Promise<{
71
76
  content: Array<{
72
77
  type: "text";
73
78
  text: string;
@@ -1 +1 @@
1
- {"version":3,"file":"receive_addresses.d.ts","sourceRoot":"","sources":["../../src/tools/receive_addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AAIxD,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;CAmB1C,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;CAiB1C,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;CAoBvC,CAAC;AAYF,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,EAC1B,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,O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