@guiie/buda-mcp 1.5.2 → 1.5.3
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/CHANGELOG.md +26 -0
- package/PUBLISH_CHECKLIST.md +55 -42
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +6 -1
- package/dist/http.js +24 -14
- package/dist/tools/batch_orders.d.ts +1 -1
- package/dist/tools/batch_orders.d.ts.map +1 -1
- package/dist/tools/batch_orders.js +2 -2
- package/dist/tools/cancel_all_orders.d.ts +1 -1
- package/dist/tools/cancel_all_orders.d.ts.map +1 -1
- package/dist/tools/cancel_all_orders.js +2 -2
- package/dist/tools/cancel_order.d.ts +1 -1
- package/dist/tools/cancel_order.d.ts.map +1 -1
- package/dist/tools/cancel_order.js +2 -2
- package/dist/tools/cancel_order_by_client_id.d.ts +1 -1
- package/dist/tools/cancel_order_by_client_id.d.ts.map +1 -1
- package/dist/tools/cancel_order_by_client_id.js +2 -2
- package/dist/tools/lightning.d.ts +1 -1
- package/dist/tools/lightning.d.ts.map +1 -1
- package/dist/tools/lightning.js +2 -2
- package/dist/tools/place_order.d.ts +1 -1
- package/dist/tools/place_order.d.ts.map +1 -1
- package/dist/tools/place_order.js +2 -2
- package/dist/tools/receive_addresses.d.ts +1 -1
- package/dist/tools/receive_addresses.d.ts.map +1 -1
- package/dist/tools/receive_addresses.js +2 -2
- package/dist/tools/remittances.d.ts +1 -1
- package/dist/tools/remittances.d.ts.map +1 -1
- package/dist/tools/remittances.js +3 -3
- package/dist/tools/withdrawals.d.ts +1 -1
- package/dist/tools/withdrawals.d.ts.map +1 -1
- package/dist/tools/withdrawals.js +2 -2
- package/package.json +2 -1
- package/server.json +2 -2
- package/src/client.ts +9 -1
- package/src/http.ts +25 -14
- package/src/tools/batch_orders.ts +6 -2
- package/src/tools/cancel_all_orders.ts +6 -2
- package/src/tools/cancel_order.ts +6 -2
- package/src/tools/cancel_order_by_client_id.ts +6 -2
- package/src/tools/lightning.ts +6 -2
- package/src/tools/place_order.ts +6 -2
- package/src/tools/receive_addresses.ts +6 -2
- package/src/tools/remittances.ts +7 -3
- package/src/tools/withdrawals.ts +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,32 @@ This project uses [Semantic Versioning](https://semver.org/).
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
+
## [1.5.3] – 2026-04-11
|
|
15
|
+
|
|
16
|
+
### Security
|
|
17
|
+
|
|
18
|
+
- **Upstream API errors no longer forwarded to MCP clients** — `BudaClient.handleResponse` now logs the full Buda API error detail (status, path, message) to `process.stderr` as structured JSON and returns only a generic message to the MCP caller (e.g. `"Buda API error 404 on /path."`). Previously, raw upstream error messages including potential internal details were forwarded directly to clients.
|
|
19
|
+
|
|
20
|
+
- **Audit log transport field corrected for HTTP** — nine destructive tool handlers (`place_order`, `cancel_order`, `cancel_all_orders`, `cancel_order_by_client_id`, `place_batch_orders`, `create_withdrawal`, `lightning_withdrawal`, `create_receive_address`, `quote_remittance`, `accept_remittance_quote`) now correctly log `transport: "http"` when invoked via the HTTP server. Previously their `register()` functions defaulted to `"stdio"`, making all HTTP audit events appear as stdio traffic.
|
|
21
|
+
|
|
22
|
+
- **HTTP security headers via `helmet`** — Express HTTP server now applies `helmet()` as the first middleware, adding `X-Content-Type-Options`, `X-Frame-Options`, `Referrer-Policy`, `X-DNS-Prefetch-Control`, `X-Download-Options`, and removing `X-Powered-By`.
|
|
23
|
+
|
|
24
|
+
- **Request body size limit** — `express.json()` now enforces an explicit `limit: "10kb"` on the `/mcp` endpoint, reducing the memory/CPU surface for oversized body attacks in combination with the existing rate limiter.
|
|
25
|
+
|
|
26
|
+
- **Rate limiting extended to `/health` and `/.well-known/mcp/server-card.json`** — a `staticRateLimiter` (60 req/min) now protects these endpoints, which previously had no throttling. Sufficient for all legitimate uptime monitors and Smithery discovery.
|
|
27
|
+
|
|
28
|
+
- **`trust proxy` topology documented** — added inline comment to `app.set("trust proxy", 1)` explaining the single-hop assumption (Railway), the impact on `req.ip` and `express-rate-limit` client IP detection, and the action required if an additional proxy layer is added.
|
|
29
|
+
|
|
30
|
+
### Pending (manual)
|
|
31
|
+
|
|
32
|
+
- **CI binary pinning** — `publish.yml` should pin `mcp-publisher` to a fixed version with SHA256 verification instead of downloading `releases/latest`. Target version: `v1.5.0`, SHA256: `79bbb73ba048c5906034f73ef6286d7763bd53cf368ea0b358fc593ed360cbd5`. See `PUBLISH_CHECKLIST.md` for the exact step.
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- `helmet` dependency (v8.x) — HTTP security headers middleware.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
14
40
|
## [1.5.2] – 2026-04-11
|
|
15
41
|
|
|
16
42
|
### Security
|
package/PUBLISH_CHECKLIST.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Publish Checklist — buda-mcp v1.5.
|
|
1
|
+
# Publish Checklist — buda-mcp v1.5.3
|
|
2
2
|
|
|
3
|
-
Steps to publish `v1.5.
|
|
3
|
+
Steps to publish `v1.5.3` to npm, the MCP registry, and notify community directories.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ Steps to publish `v1.5.2` to npm, the MCP registry, and notify community directo
|
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
# Confirm version
|
|
11
|
-
node -e "console.log(require('./package.json').version)" # should print 1.5.
|
|
11
|
+
node -e "console.log(require('./package.json').version)" # should print 1.5.3
|
|
12
12
|
|
|
13
13
|
# Build and test
|
|
14
14
|
npm run build
|
|
@@ -37,9 +37,9 @@ Verify: https://www.npmjs.com/package/@guiie/buda-mcp
|
|
|
37
37
|
|
|
38
38
|
## 3. GitHub release
|
|
39
39
|
|
|
40
|
-
Tag and release already created via `gh release create v1.5.
|
|
40
|
+
Tag and release already created via `gh release create v1.5.3`. Verify at:
|
|
41
41
|
|
|
42
|
-
https://github.com/gtorreal/buda-mcp/releases/tag/v1.5.
|
|
42
|
+
https://github.com/gtorreal/buda-mcp/releases/tag/v1.5.3
|
|
43
43
|
|
|
44
44
|
---
|
|
45
45
|
|
|
@@ -64,23 +64,18 @@ Verify: https://smithery.ai/server/@guiie/buda-mcp
|
|
|
64
64
|
**Email/message template:**
|
|
65
65
|
|
|
66
66
|
```
|
|
67
|
-
Subject: [Update] buda-mcp v1.5.
|
|
67
|
+
Subject: [Update] buda-mcp v1.5.3 — Security hardening (third pass)
|
|
68
68
|
|
|
69
69
|
Hi mcp.so team,
|
|
70
70
|
|
|
71
|
-
I've released v1.5.
|
|
71
|
+
I've released v1.5.3 of buda-mcp (@guiie/buda-mcp on npm).
|
|
72
72
|
|
|
73
73
|
Key changes (security hardening, no new tools):
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
- Dead man's switch: renew/disarm also blocked on HTTP transport
|
|
80
|
-
- validateCurrency() added to compare_markets tool
|
|
81
|
-
- Stronger BOLT-11 regex validation in lightning_withdrawal
|
|
82
|
-
- Internal API paths redacted from all error responses (31 tool handlers)
|
|
83
|
-
- 28 new unit tests (total now 184)
|
|
74
|
+
- Upstream API errors no longer forwarded to MCP clients (generic messages only, detail logged server-side)
|
|
75
|
+
- Audit log transport field corrected for HTTP (9 handlers previously showed "stdio" for HTTP traffic)
|
|
76
|
+
- HTTP security headers via helmet (X-Content-Type-Options, X-Frame-Options, Referrer-Policy, etc.)
|
|
77
|
+
- Request body size limit enforced (10kb) on /mcp endpoint
|
|
78
|
+
- Rate limiting extended to /health and /.well-known/mcp/server-card.json endpoints
|
|
84
79
|
|
|
85
80
|
Links:
|
|
86
81
|
- npm: https://www.npmjs.com/package/@guiie/buda-mcp
|
|
@@ -99,24 +94,22 @@ Thank you!
|
|
|
99
94
|
**Message template:**
|
|
100
95
|
|
|
101
96
|
```
|
|
102
|
-
Subject: [Update] buda-mcp v1.5.
|
|
97
|
+
Subject: [Update] buda-mcp v1.5.3
|
|
103
98
|
|
|
104
99
|
Hi Glama team,
|
|
105
100
|
|
|
106
|
-
buda-mcp has been updated to v1.5.
|
|
101
|
+
buda-mcp has been updated to v1.5.3.
|
|
107
102
|
|
|
108
103
|
Package: @guiie/buda-mcp (npm)
|
|
109
104
|
Registry: io.github.gtorreal/buda-mcp (MCP Registry)
|
|
110
|
-
Version: 1.5.
|
|
111
|
-
|
|
112
|
-
Changes (security hardening,
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
- Stronger BOLT-11 regex
|
|
119
|
-
- Internal paths redacted from error responses
|
|
105
|
+
Version: 1.5.3
|
|
106
|
+
|
|
107
|
+
Changes (security hardening, third pass):
|
|
108
|
+
- Upstream API errors no longer forwarded to MCP clients
|
|
109
|
+
- Audit log transport field corrected for HTTP (9 handlers)
|
|
110
|
+
- HTTP security headers via helmet
|
|
111
|
+
- Request body size limit (10kb) on /mcp endpoint
|
|
112
|
+
- Rate limiting on /health and server-card endpoints
|
|
120
113
|
- 184 unit tests
|
|
121
114
|
|
|
122
115
|
Quick start:
|
|
@@ -132,25 +125,45 @@ Thank you!
|
|
|
132
125
|
|
|
133
126
|
## 8. Post-publish verification
|
|
134
127
|
|
|
135
|
-
- [ ] `npx @guiie/buda-mcp@1.5.
|
|
136
|
-
- [ ] `npm info @guiie/buda-mcp version` returns `1.5.
|
|
137
|
-
- [ ] GitHub release tag `v1.5.
|
|
138
|
-
- [ ] MCP Registry entry reflects v1.5.
|
|
128
|
+
- [ ] `npx @guiie/buda-mcp@1.5.3` starts successfully
|
|
129
|
+
- [ ] `npm info @guiie/buda-mcp version` returns `1.5.3`
|
|
130
|
+
- [ ] GitHub release tag `v1.5.3` is visible
|
|
131
|
+
- [ ] MCP Registry entry reflects v1.5.3
|
|
139
132
|
- [ ] Smithery server card lists all tools
|
|
140
|
-
- [ ] `GET /health` returns `"version":"1.5.
|
|
141
|
-
- [ ]
|
|
142
|
-
- [ ] `
|
|
143
|
-
- [ ]
|
|
144
|
-
- [ ]
|
|
145
|
-
- [ ]
|
|
146
|
-
- [ ] `renew_cancel_timer` via HTTP returns `TRANSPORT_NOT_SUPPORTED`
|
|
147
|
-
- [ ] Error responses do NOT include internal `path` field
|
|
148
|
-
- [ ] Audit events appear in stderr as JSON with `audit: true`
|
|
133
|
+
- [ ] `GET /health` returns `"version":"1.5.3"` on Railway deployment
|
|
134
|
+
- [ ] `GET /health` responds with `X-Content-Type-Options: nosniff` header (helmet active)
|
|
135
|
+
- [ ] `GET /health` rate-limited at 60 req/min
|
|
136
|
+
- [ ] Error responses from the MCP server show generic message (not raw Buda API detail)
|
|
137
|
+
- [ ] Audit log shows `"transport":"http"` for HTTP-triggered destructive tools
|
|
138
|
+
- [ ] Pending: manually apply CI binary pinning to `publish.yml` (see CHANGELOG v1.5.3)
|
|
149
139
|
- [ ] mcp.so listing updated
|
|
150
140
|
- [ ] Glama.ai listing updated
|
|
151
141
|
|
|
152
142
|
---
|
|
153
143
|
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## 9. Pending manual fix — CI binary pinning
|
|
147
|
+
|
|
148
|
+
Edit `.github/workflows/publish.yml`, replace the `Install mcp-publisher` step with:
|
|
149
|
+
|
|
150
|
+
```yaml
|
|
151
|
+
- name: Install mcp-publisher
|
|
152
|
+
env:
|
|
153
|
+
MCP_PUBLISHER_VERSION: "v1.5.0"
|
|
154
|
+
MCP_PUBLISHER_SHA256: "79bbb73ba048c5906034f73ef6286d7763bd53cf368ea0b358fc593ed360cbd5"
|
|
155
|
+
run: |
|
|
156
|
+
curl -fsSL "https://github.com/modelcontextprotocol/registry/releases/download/${MCP_PUBLISHER_VERSION}/mcp-publisher_linux_amd64.tar.gz" \
|
|
157
|
+
-o mcp-publisher.tar.gz
|
|
158
|
+
echo "${MCP_PUBLISHER_SHA256} mcp-publisher.tar.gz" | sha256sum --check
|
|
159
|
+
tar xz -f mcp-publisher.tar.gz mcp-publisher
|
|
160
|
+
sudo mv mcp-publisher /usr/local/bin/
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
SHA256 verified against GitHub release `v1.5.0` on 2026-04-11. Update both values when bumping `mcp-publisher`.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
154
167
|
## ARCHIVED: previous checklists
|
|
155
168
|
|
|
156
169
|
See git tags `v1.5.0`, `v1.5.1`, `v1.4.0`, `v1.4.1`, `v1.4.2` for previous release notes and verification steps.
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAKA,qBAAa,YAAa,SAAQ,KAAK;aAEnB,MAAM,EAAE,MAAM;aACd,IAAI,EAAE,MAAM;aAEZ,YAAY,CAAC,EAAE,MAAM;gBAHrB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EAC5B,OAAO,EAAE,MAAM,EACC,YAAY,CAAC,EAAE,MAAM,YAAA;CAKxC;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;gBAG7C,OAAO,GAAE,MAAiB,EAC1B,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,MAAM;IAOpB,OAAO,IAAI,OAAO;IAIlB,OAAO,CAAC,aAAa,CAAK;IAE1B,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,IAAI;IASZ,OAAO,CAAC,WAAW;IAWnB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAOzB;;;;OAIG;YACW,cAAc;YA2Bd,cAAc;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAKA,qBAAa,YAAa,SAAQ,K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
|
|
|
90
90
|
catch {
|
|
91
91
|
// ignore parse error, use statusText
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
// Log full upstream detail server-side only — never forward to MCP caller
|
|
94
|
+
process.stderr.write(JSON.stringify({ buda_api_error: true, status: response.status, path, detail }) + "\n");
|
|
95
|
+
const clientMsg = response.status === 429
|
|
96
|
+
? `Rate limit exceeded on ${path}. Retry later.`
|
|
97
|
+
: `Buda API error ${response.status} on ${path}.`;
|
|
98
|
+
throw new BudaApiError(response.status, path, clientMsg);
|
|
94
99
|
}
|
|
95
100
|
return response.json();
|
|
96
101
|
}
|
package/dist/http.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import express from "express";
|
|
2
|
+
import helmet from "helmet";
|
|
2
3
|
import rateLimit from "express-rate-limit";
|
|
3
4
|
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
5
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
@@ -127,22 +128,22 @@ function createServer() {
|
|
|
127
128
|
if (authEnabled) {
|
|
128
129
|
balances.register(server, client);
|
|
129
130
|
orders.register(server, client);
|
|
130
|
-
placeOrder.register(server, client);
|
|
131
|
-
cancelOrder.register(server, client);
|
|
131
|
+
placeOrder.register(server, client, "http");
|
|
132
|
+
cancelOrder.register(server, client, "http");
|
|
132
133
|
deadMansSwitch.register(server, client, "http");
|
|
133
134
|
account.register(server, client);
|
|
134
135
|
balance.register(server, client);
|
|
135
136
|
orderLookup.register(server, client);
|
|
136
137
|
networkFees.register(server, client);
|
|
137
138
|
deposits.register(server, client);
|
|
138
|
-
withdrawals.register(server, client);
|
|
139
|
-
receiveAddresses.register(server, client);
|
|
140
|
-
remittances.register(server, client);
|
|
139
|
+
withdrawals.register(server, client, "http");
|
|
140
|
+
receiveAddresses.register(server, client, "http");
|
|
141
|
+
remittances.register(server, client, "http");
|
|
141
142
|
remittanceRecipients.register(server, client);
|
|
142
|
-
cancelAllOrders.register(server, client);
|
|
143
|
-
cancelOrderByClientId.register(server, client);
|
|
144
|
-
batchOrders.register(server, client);
|
|
145
|
-
lightning.register(server, client);
|
|
143
|
+
cancelAllOrders.register(server, client, "http");
|
|
144
|
+
cancelOrderByClientId.register(server, client, "http");
|
|
145
|
+
batchOrders.register(server, client, "http");
|
|
146
|
+
lightning.register(server, client, "http");
|
|
146
147
|
}
|
|
147
148
|
// MCP Resources
|
|
148
149
|
server.resource("buda-markets", "buda://markets", async (uri) => {
|
|
@@ -195,10 +196,12 @@ function createServer() {
|
|
|
195
196
|
return server;
|
|
196
197
|
}
|
|
197
198
|
const app = express();
|
|
198
|
-
|
|
199
|
-
//
|
|
199
|
+
app.use(helmet());
|
|
200
|
+
// trust proxy: 1 = trust exactly one hop (Railway's reverse proxy).
|
|
201
|
+
// If Cloudflare or another proxy is added in front, increment this value.
|
|
202
|
+
// Affects: req.ip and express-rate-limit client IP detection.
|
|
200
203
|
app.set("trust proxy", 1);
|
|
201
|
-
app.use(express.json());
|
|
204
|
+
app.use(express.json({ limit: "10kb" }));
|
|
202
205
|
const MCP_AUTH_TOKEN = process.env.MCP_AUTH_TOKEN;
|
|
203
206
|
if (authEnabled && !MCP_AUTH_TOKEN) {
|
|
204
207
|
console.error("[buda-mcp] FATAL: BUDA_API_KEY/BUDA_API_SECRET are set but MCP_AUTH_TOKEN is not.\n" +
|
|
@@ -224,6 +227,13 @@ const mcpRateLimiter = rateLimit({
|
|
|
224
227
|
legacyHeaders: false,
|
|
225
228
|
message: { error: "Too many requests. Retry after 60 seconds.", code: "RATE_LIMITED" },
|
|
226
229
|
});
|
|
230
|
+
const staticRateLimiter = rateLimit({
|
|
231
|
+
windowMs: 60_000,
|
|
232
|
+
max: 60,
|
|
233
|
+
standardHeaders: true,
|
|
234
|
+
legacyHeaders: false,
|
|
235
|
+
message: { error: "Too many requests.", code: "RATE_LIMITED" },
|
|
236
|
+
});
|
|
227
237
|
function mcpAuthMiddleware(req, res, next) {
|
|
228
238
|
if (!MCP_AUTH_TOKEN) {
|
|
229
239
|
next();
|
|
@@ -237,7 +247,7 @@ function mcpAuthMiddleware(req, res, next) {
|
|
|
237
247
|
next();
|
|
238
248
|
}
|
|
239
249
|
// Health check for Railway / uptime monitors
|
|
240
|
-
app.get("/health", (_req, res) => {
|
|
250
|
+
app.get("/health", staticRateLimiter, (_req, res) => {
|
|
241
251
|
res.json({
|
|
242
252
|
status: "ok",
|
|
243
253
|
server: "buda-mcp",
|
|
@@ -247,7 +257,7 @@ app.get("/health", (_req, res) => {
|
|
|
247
257
|
});
|
|
248
258
|
// Smithery static server card — assembled programmatically from tool definitions.
|
|
249
259
|
// Adding a new tool only requires exporting its toolSchema; this handler needs no changes.
|
|
250
|
-
app.get("/.well-known/mcp/server-card.json", (_req, res) => {
|
|
260
|
+
app.get("/.well-known/mcp/server-card.json", staticRateLimiter, (_req, res) => {
|
|
251
261
|
res.json({
|
|
252
262
|
serverInfo: { name: "buda-mcp", version: VERSION },
|
|
253
263
|
authentication: { required: authEnabled },
|
|
@@ -77,6 +77,6 @@ export declare function handlePlaceBatchOrders(args: BatchOrdersArgs, client: Bu
|
|
|
77
77
|
}>;
|
|
78
78
|
isError?: boolean;
|
|
79
79
|
}>;
|
|
80
|
-
export declare function register(server: McpServer, client: BudaClient): void;
|
|
80
|
+
export declare function register(server: McpServer, client: BudaClient, transport?: "http" | "stdio"): void;
|
|
81
81
|
export {};
|
|
82
82
|
//# sourceMappingURL=batch_orders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch_orders.d.ts","sourceRoot":"","sources":["../../src/tools/batch_orders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AAKxD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;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AC5B,CAAC;AAEF,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,eAAe,EACrB,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,CA2IhF;AAED,wBAAgB,QAAQ,CACtB,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,UAAU,EAClB,SAAS,GAAE,MAAM,GAAG,OAAiB,GACpC,IAAI,CA2BN"}
|
|
@@ -176,7 +176,7 @@ export async function handlePlaceBatchOrders(args, client, transport = "stdio")
|
|
|
176
176
|
isError,
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
-
export function register(server, client) {
|
|
179
|
+
export function register(server, client, transport = "stdio") {
|
|
180
180
|
server.tool(toolSchema.name, toolSchema.description, {
|
|
181
181
|
orders: z
|
|
182
182
|
.array(orderShape)
|
|
@@ -193,6 +193,6 @@ export function register(server, client) {
|
|
|
193
193
|
confirmation_token: z
|
|
194
194
|
.string()
|
|
195
195
|
.describe("Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."),
|
|
196
|
-
}, (args) => handlePlaceBatchOrders(args, client));
|
|
196
|
+
}, (args) => handlePlaceBatchOrders(args, client, transport));
|
|
197
197
|
}
|
|
198
198
|
//# sourceMappingURL=batch_orders.js.map
|
|
@@ -29,6 +29,6 @@ export declare function handleCancelAllOrders(args: CancelAllOrdersArgs, client:
|
|
|
29
29
|
}>;
|
|
30
30
|
isError?: boolean;
|
|
31
31
|
}>;
|
|
32
|
-
export declare function register(server: McpServer, client: BudaClient): void;
|
|
32
|
+
export declare function register(server: McpServer, client: BudaClient, transport?: "http" | "stdio"): void;
|
|
33
33
|
export {};
|
|
34
34
|
//# sourceMappingURL=cancel_all_orders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cancel_all_orders.d.ts","sourceRoot":"","sources":["../../src/tools/cancel_all_orders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AAKxD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAuBtB,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,mBAAmB,EACzB,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,CAqDhF;AAED,wBAAgB,QAAQ,
|
|
1
|
+
{"version":3,"file":"cancel_all_orders.d.ts","sourceRoot":"","sources":["../../src/tools/cancel_all_orders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AAKxD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAuBtB,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,mBAAmB,EACzB,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,CAqDhF;AAED,wBAAgB,QAAQ,CACtB,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,UAAU,EAClB,SAAS,GAAE,MAAM,GAAG,OAAiB,GACpC,IAAI,CAkBN"}
|
|
@@ -71,7 +71,7 @@ export async function handleCancelAllOrders(args, client, transport = "stdio") {
|
|
|
71
71
|
return result;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
export function register(server, client) {
|
|
74
|
+
export function register(server, client, transport = "stdio") {
|
|
75
75
|
server.tool(toolSchema.name, toolSchema.description, {
|
|
76
76
|
market_id: z
|
|
77
77
|
.string()
|
|
@@ -81,6 +81,6 @@ export function register(server, client) {
|
|
|
81
81
|
.string()
|
|
82
82
|
.describe("Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute. " +
|
|
83
83
|
"Any other value will reject the request without canceling."),
|
|
84
|
-
}, (args) => handleCancelAllOrders(args, client));
|
|
84
|
+
}, (args) => handleCancelAllOrders(args, client, transport));
|
|
85
85
|
}
|
|
86
86
|
//# sourceMappingURL=cancel_all_orders.js.map
|
|
@@ -29,6 +29,6 @@ export declare function handleCancelOrder(args: CancelOrderArgs, client: BudaCli
|
|
|
29
29
|
}>;
|
|
30
30
|
isError?: boolean;
|
|
31
31
|
}>;
|
|
32
|
-
export declare function register(server: McpServer, client: BudaClient): void;
|
|
32
|
+
export declare function register(server: McpServer, client: BudaClient, transport?: "http" | "stdio"): void;
|
|
33
33
|
export {};
|
|
34
34
|
//# sourceMappingURL=cancel_order.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cancel_order.d.ts","sourceRoot":"","sources":["../../src/tools/cancel_order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAA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AG,OAAiB,GACpC,IAAI,CAmBN"}
|
|
@@ -58,7 +58,7 @@ export async function handleCancelOrder(args, client, transport = "stdio") {
|
|
|
58
58
|
return result;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
export function register(server, client) {
|
|
61
|
+
export function register(server, client, transport = "stdio") {
|
|
62
62
|
server.tool(toolSchema.name, toolSchema.description, {
|
|
63
63
|
order_id: z
|
|
64
64
|
.number()
|
|
@@ -69,6 +69,6 @@ export function register(server, client) {
|
|
|
69
69
|
.string()
|
|
70
70
|
.describe("Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to cancel the order. " +
|
|
71
71
|
"Any other value will reject the request without canceling."),
|
|
72
|
-
}, (args) => handleCancelOrder(args, client));
|
|
72
|
+
}, (args) => handleCancelOrder(args, client, transport));
|
|
73
73
|
}
|
|
74
74
|
//# sourceMappingURL=cancel_order.js.map
|
|
@@ -29,6 +29,6 @@ export declare function handleCancelOrderByClientId(args: CancelOrderByClientIdA
|
|
|
29
29
|
}>;
|
|
30
30
|
isError?: boolean;
|
|
31
31
|
}>;
|
|
32
|
-
export declare function register(server: McpServer, client: BudaClient): void;
|
|
32
|
+
export declare function register(server: McpServer, client: BudaClient, transport?: "http" | "stdio"): void;
|
|
33
33
|
export {};
|
|
34
34
|
//# sourceMappingURL=cancel_order_by_client_id.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cancel_order_by_client_id.d.ts","sourceRoot":"","sources":["../../src/tools/cancel_order_by_client_id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AAKxD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAsBtB,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAmCF,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,yBAAyB,EAC/B,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,CAuChF;AAED,wBAAgB,QAAQ,
|
|
1
|
+
{"version":3,"file":"cancel_order_by_client_id.d.ts","sourceRoot":"","sources":["../../src/tools/cancel_order_by_client_id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AAKxD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAsBtB,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAmCF,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,yBAAyB,EAC/B,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,CAuChF;AAED,wBAAgB,QAAQ,CACtB,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,UAAU,EAClB,SAAS,GAAE,MAAM,GAAG,OAAiB,GACpC,IAAI,CAkBN"}
|
|
@@ -87,7 +87,7 @@ export async function handleCancelOrderByClientId(args, client, transport = "std
|
|
|
87
87
|
return result;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
export function register(server, client) {
|
|
90
|
+
export function register(server, client, transport = "stdio") {
|
|
91
91
|
server.tool(toolSchema.name, toolSchema.description, {
|
|
92
92
|
client_id: z
|
|
93
93
|
.string()
|
|
@@ -97,6 +97,6 @@ export function register(server, client) {
|
|
|
97
97
|
.string()
|
|
98
98
|
.describe("Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute. " +
|
|
99
99
|
"Any other value will reject the request without canceling."),
|
|
100
|
-
}, (args) => handleCancelOrderByClientId(args, client));
|
|
100
|
+
}, (args) => handleCancelOrderByClientId(args, client, transport));
|
|
101
101
|
}
|
|
102
102
|
//# sourceMappingURL=cancel_order_by_client_id.js.map
|
|
@@ -63,6 +63,6 @@ export declare function handleCreateLightningInvoice(args: CreateLightningInvoic
|
|
|
63
63
|
}>;
|
|
64
64
|
isError?: boolean;
|
|
65
65
|
}>;
|
|
66
|
-
export declare function register(server: McpServer, client: BudaClient): void;
|
|
66
|
+
export declare function register(server: McpServer, client: BudaClient, transport?: "http" | "stdio"): void;
|
|
67
67
|
export {};
|
|
68
68
|
//# sourceMappingURL=lightning.d.ts.map
|
|
@@ -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;AAKxD,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;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAA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E,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,CACtB,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,UAAU,EAClB,SAAS,GAAE,MAAM,GAAG,OAAiB,GACpC,IAAI,CA2CN"}
|
package/dist/tools/lightning.js
CHANGED
|
@@ -153,7 +153,7 @@ export async function handleCreateLightningInvoice(args, client) {
|
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
export function register(server, client) {
|
|
156
|
+
export function register(server, client, transport = "stdio") {
|
|
157
157
|
server.tool(lightningWithdrawalToolSchema.name, lightningWithdrawalToolSchema.description, {
|
|
158
158
|
invoice: z
|
|
159
159
|
.string()
|
|
@@ -163,7 +163,7 @@ export function register(server, client) {
|
|
|
163
163
|
.string()
|
|
164
164
|
.describe("Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute. " +
|
|
165
165
|
"Any other value will reject the request without paying."),
|
|
166
|
-
}, (args) => handleLightningWithdrawal(args, client));
|
|
166
|
+
}, (args) => handleLightningWithdrawal(args, client, transport));
|
|
167
167
|
server.tool(createLightningInvoiceToolSchema.name, createLightningInvoiceToolSchema.description, {
|
|
168
168
|
amount_satoshis: z
|
|
169
169
|
.number()
|
|
@@ -79,6 +79,6 @@ export declare function handlePlaceOrder(args: PlaceOrderArgs, client: BudaClien
|
|
|
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?: "http" | "stdio"): void;
|
|
83
83
|
export {};
|
|
84
84
|
//# sourceMappingURL=place_order.d.ts.map
|
|
@@ -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;AAKxD,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,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;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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AAE,UAAU,EAClB,SAAS,GAAE,MAAM,GAAG,OAAiB,GACpC,IAAI,CA4DN"}
|
|
@@ -226,7 +226,7 @@ export async function handlePlaceOrder(args, client, transport = "stdio") {
|
|
|
226
226
|
return result;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
export function register(server, client) {
|
|
229
|
+
export function register(server, client, transport = "stdio") {
|
|
230
230
|
server.tool(toolSchema.name, toolSchema.description, {
|
|
231
231
|
market_id: z
|
|
232
232
|
.string()
|
|
@@ -276,6 +276,6 @@ export function register(server, client) {
|
|
|
276
276
|
.string()
|
|
277
277
|
.describe("Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute the order. " +
|
|
278
278
|
"Any other value will reject the request without placing an order."),
|
|
279
|
-
}, (args) => handlePlaceOrder(args, client));
|
|
279
|
+
}, (args) => handlePlaceOrder(args, client, transport));
|
|
280
280
|
}
|
|
281
281
|
//# sourceMappingURL=place_order.js.map
|
|
@@ -79,5 +79,5 @@ export declare function handleCreateReceiveAddress(args: {
|
|
|
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?: "http" | "stdio"): void;
|
|
83
83
|
//# sourceMappingURL=receive_addresses.d.ts.map
|
|
@@ -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;AAKxD,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;CAwB1C,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;CAiB1C,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;CAoBvC,CAAC;AAY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Address(args, client, transport = "stdi
|
|
|
167
167
|
return result;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
export function register(server, client) {
|
|
170
|
+
export function register(server, client, transport = "stdio") {
|
|
171
171
|
server.tool(listReceiveAddressesToolSchema.name, listReceiveAddressesToolSchema.description, {
|
|
172
172
|
currency: z.string().min(2).max(10).describe("Currency code (e.g. 'BTC', 'ETH')."),
|
|
173
173
|
}, (args) => handleListReceiveAddresses(args, client));
|
|
@@ -180,6 +180,6 @@ export function register(server, client) {
|
|
|
180
180
|
confirmation_token: z
|
|
181
181
|
.string()
|
|
182
182
|
.describe("Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to generate a new address."),
|
|
183
|
-
}, (args) => handleCreateReceiveAddress(args, client));
|
|
183
|
+
}, (args) => handleCreateReceiveAddress(args, client, transport));
|
|
184
184
|
}
|
|
185
185
|
//# sourceMappingURL=receive_addresses.js.map
|
|
@@ -116,5 +116,5 @@ export declare function handleAcceptRemittanceQuote(args: {
|
|
|
116
116
|
}>;
|
|
117
117
|
isError?: boolean;
|
|
118
118
|
}>;
|
|
119
|
-
export declare function register(server: McpServer, client: BudaClient): void;
|
|
119
|
+
export declare function register(server: McpServer, client: BudaClient, transport?: "http" | "stdio"): void;
|
|
120
120
|
//# sourceMappingURL=remittances.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remittances.d.ts","sourceRoot":"","sources":["../../src/tools/remittances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AAMxD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;CAoBrC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;CAiCrC,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;CAuB3C,CAAC;AAEF,eAAO,MAAM,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CAgBhF;AAED,wBAAsB,qBAAqB,CACzC,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,EAC5F,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,CAiDhF;AAED,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,EAChD,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,CAoChF;AAED,wBAAgB,QAAQ,CACtB,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,UAAU,EAClB,SAAS,GAAE,MAAM,GAAG,OAAiB,GACpC,IAAI,CA2CN"}
|
|
@@ -236,7 +236,7 @@ export async function handleAcceptRemittanceQuote(args, client, transport = "std
|
|
|
236
236
|
return result;
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
export function register(server, client) {
|
|
239
|
+
export function register(server, client, transport = "stdio") {
|
|
240
240
|
server.tool(listRemittancesToolSchema.name, listRemittancesToolSchema.description, {
|
|
241
241
|
per: z.number().int().min(1).max(300).optional().describe("Results per page (default: 20, max: 300)."),
|
|
242
242
|
page: z.number().int().min(1).optional().describe("Page number (default: 1)."),
|
|
@@ -251,10 +251,10 @@ export function register(server, client) {
|
|
|
251
251
|
confirmation_token: z
|
|
252
252
|
.string()
|
|
253
253
|
.describe("Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to create the quote."),
|
|
254
|
-
}, (args) => handleQuoteRemittance(args, client));
|
|
254
|
+
}, (args) => handleQuoteRemittance(args, client, transport));
|
|
255
255
|
server.tool(acceptRemittanceQuoteToolSchema.name, acceptRemittanceQuoteToolSchema.description, {
|
|
256
256
|
id: z.number().int().positive().describe("The numeric ID of the remittance quote to accept."),
|
|
257
257
|
confirmation_token: z.string().describe("Must be 'CONFIRM' to proceed. Any other value aborts."),
|
|
258
|
-
}, (args) => handleAcceptRemittanceQuote(args, client));
|
|
258
|
+
}, (args) => handleAcceptRemittanceQuote(args, client, transport));
|
|
259
259
|
}
|
|
260
260
|
//# sourceMappingURL=remittances.js.map
|
|
@@ -88,6 +88,6 @@ export declare function handleCreateWithdrawal(args: CreateWithdrawalArgs, clien
|
|
|
88
88
|
}>;
|
|
89
89
|
isError?: boolean;
|
|
90
90
|
}>;
|
|
91
|
-
export declare function register(server: McpServer, client: BudaClient): void;
|
|
91
|
+
export declare function register(server: McpServer, client: BudaClient, transport?: "http" | "stdio"): void;
|
|
92
92
|
export {};
|
|
93
93
|
//# sourceMappingURL=withdrawals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawals.d.ts","sourceRoot":"","sources":["../../src/tools/withdrawals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AAMxD,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;CA8B1C,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,mBAAmB,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,G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B,GACpC,IAAI,CA+BN"}
|
|
@@ -201,7 +201,7 @@ export async function handleCreateWithdrawal(args, client, transport = "stdio")
|
|
|
201
201
|
return result;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
export function register(server, client) {
|
|
204
|
+
export function register(server, client, transport = "stdio") {
|
|
205
205
|
server.tool(getWithdrawalHistoryToolSchema.name, getWithdrawalHistoryToolSchema.description, {
|
|
206
206
|
currency: z.string().min(2).max(10).describe("Currency code (e.g. 'BTC', 'CLP')."),
|
|
207
207
|
state: z
|
|
@@ -220,6 +220,6 @@ export function register(server, client) {
|
|
|
220
220
|
confirmation_token: z
|
|
221
221
|
.string()
|
|
222
222
|
.describe("Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."),
|
|
223
|
-
}, (args) => handleCreateWithdrawal(args, client));
|
|
223
|
+
}, (args) => handleCreateWithdrawal(args, client, transport));
|
|
224
224
|
}
|
|
225
225
|
//# sourceMappingURL=withdrawals.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guiie/buda-mcp",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"mcpName": "io.github.gtorreal/buda-mcp",
|
|
5
5
|
"description": "MCP server for Buda.com's public cryptocurrency exchange API (Chile, Colombia, Peru)",
|
|
6
6
|
"type": "module",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
51
51
|
"express": "^5.2.1",
|
|
52
52
|
"express-rate-limit": "^8.3.2",
|
|
53
|
+
"helmet": "^8.1.0",
|
|
53
54
|
"zod": "^4.3.6"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/gtorreal/buda-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "1.5.
|
|
9
|
+
"version": "1.5.3",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "@guiie/buda-mcp",
|
|
14
|
-
"version": "1.5.
|
|
14
|
+
"version": "1.5.3",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
}
|
package/src/client.ts
CHANGED
|
@@ -113,7 +113,15 @@ export class BudaClient {
|
|
|
113
113
|
} catch {
|
|
114
114
|
// ignore parse error, use statusText
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
// Log full upstream detail server-side only — never forward to MCP caller
|
|
117
|
+
process.stderr.write(
|
|
118
|
+
JSON.stringify({ buda_api_error: true, status: response.status, path, detail }) + "\n",
|
|
119
|
+
);
|
|
120
|
+
const clientMsg =
|
|
121
|
+
response.status === 429
|
|
122
|
+
? `Rate limit exceeded on ${path}. Retry later.`
|
|
123
|
+
: `Buda API error ${response.status} on ${path}.`;
|
|
124
|
+
throw new BudaApiError(response.status, path, clientMsg);
|
|
117
125
|
}
|
|
118
126
|
return response.json() as Promise<T>;
|
|
119
127
|
}
|
package/src/http.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import express from "express";
|
|
2
|
+
import helmet from "helmet";
|
|
2
3
|
import rateLimit from "express-rate-limit";
|
|
3
4
|
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
5
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
@@ -140,22 +141,22 @@ function createServer(): McpServer {
|
|
|
140
141
|
if (authEnabled) {
|
|
141
142
|
balances.register(server, client);
|
|
142
143
|
orders.register(server, client);
|
|
143
|
-
placeOrder.register(server, client);
|
|
144
|
-
cancelOrder.register(server, client);
|
|
144
|
+
placeOrder.register(server, client, "http");
|
|
145
|
+
cancelOrder.register(server, client, "http");
|
|
145
146
|
deadMansSwitch.register(server, client, "http");
|
|
146
147
|
account.register(server, client);
|
|
147
148
|
balance.register(server, client);
|
|
148
149
|
orderLookup.register(server, client);
|
|
149
150
|
networkFees.register(server, client);
|
|
150
151
|
deposits.register(server, client);
|
|
151
|
-
withdrawals.register(server, client);
|
|
152
|
-
receiveAddresses.register(server, client);
|
|
153
|
-
remittances.register(server, client);
|
|
152
|
+
withdrawals.register(server, client, "http");
|
|
153
|
+
receiveAddresses.register(server, client, "http");
|
|
154
|
+
remittances.register(server, client, "http");
|
|
154
155
|
remittanceRecipients.register(server, client);
|
|
155
|
-
cancelAllOrders.register(server, client);
|
|
156
|
-
cancelOrderByClientId.register(server, client);
|
|
157
|
-
batchOrders.register(server, client);
|
|
158
|
-
lightning.register(server, client);
|
|
156
|
+
cancelAllOrders.register(server, client, "http");
|
|
157
|
+
cancelOrderByClientId.register(server, client, "http");
|
|
158
|
+
batchOrders.register(server, client, "http");
|
|
159
|
+
lightning.register(server, client, "http");
|
|
159
160
|
}
|
|
160
161
|
|
|
161
162
|
// MCP Resources
|
|
@@ -231,10 +232,12 @@ function createServer(): McpServer {
|
|
|
231
232
|
}
|
|
232
233
|
|
|
233
234
|
const app = express();
|
|
234
|
-
|
|
235
|
-
//
|
|
235
|
+
app.use(helmet());
|
|
236
|
+
// trust proxy: 1 = trust exactly one hop (Railway's reverse proxy).
|
|
237
|
+
// If Cloudflare or another proxy is added in front, increment this value.
|
|
238
|
+
// Affects: req.ip and express-rate-limit client IP detection.
|
|
236
239
|
app.set("trust proxy", 1);
|
|
237
|
-
app.use(express.json());
|
|
240
|
+
app.use(express.json({ limit: "10kb" }));
|
|
238
241
|
|
|
239
242
|
const MCP_AUTH_TOKEN = process.env.MCP_AUTH_TOKEN;
|
|
240
243
|
|
|
@@ -269,6 +272,14 @@ const mcpRateLimiter = rateLimit({
|
|
|
269
272
|
message: { error: "Too many requests. Retry after 60 seconds.", code: "RATE_LIMITED" },
|
|
270
273
|
});
|
|
271
274
|
|
|
275
|
+
const staticRateLimiter = rateLimit({
|
|
276
|
+
windowMs: 60_000,
|
|
277
|
+
max: 60,
|
|
278
|
+
standardHeaders: true,
|
|
279
|
+
legacyHeaders: false,
|
|
280
|
+
message: { error: "Too many requests.", code: "RATE_LIMITED" },
|
|
281
|
+
});
|
|
282
|
+
|
|
272
283
|
function mcpAuthMiddleware(
|
|
273
284
|
req: express.Request,
|
|
274
285
|
res: express.Response,
|
|
@@ -287,7 +298,7 @@ function mcpAuthMiddleware(
|
|
|
287
298
|
}
|
|
288
299
|
|
|
289
300
|
// Health check for Railway / uptime monitors
|
|
290
|
-
app.get("/health", (_req, res) => {
|
|
301
|
+
app.get("/health", staticRateLimiter, (_req, res) => {
|
|
291
302
|
res.json({
|
|
292
303
|
status: "ok",
|
|
293
304
|
server: "buda-mcp",
|
|
@@ -298,7 +309,7 @@ app.get("/health", (_req, res) => {
|
|
|
298
309
|
|
|
299
310
|
// Smithery static server card — assembled programmatically from tool definitions.
|
|
300
311
|
// Adding a new tool only requires exporting its toolSchema; this handler needs no changes.
|
|
301
|
-
app.get("/.well-known/mcp/server-card.json", (_req, res) => {
|
|
312
|
+
app.get("/.well-known/mcp/server-card.json", staticRateLimiter, (_req, res) => {
|
|
302
313
|
res.json({
|
|
303
314
|
serverInfo: { name: "buda-mcp", version: VERSION },
|
|
304
315
|
authentication: { required: authEnabled },
|
|
@@ -219,7 +219,11 @@ export async function handlePlaceBatchOrders(
|
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
export function register(
|
|
222
|
+
export function register(
|
|
223
|
+
server: McpServer,
|
|
224
|
+
client: BudaClient,
|
|
225
|
+
transport: "http" | "stdio" = "stdio",
|
|
226
|
+
): void {
|
|
223
227
|
server.tool(
|
|
224
228
|
toolSchema.name,
|
|
225
229
|
toolSchema.description,
|
|
@@ -244,6 +248,6 @@ export function register(server: McpServer, client: BudaClient): void {
|
|
|
244
248
|
"Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute.",
|
|
245
249
|
),
|
|
246
250
|
},
|
|
247
|
-
(args) => handlePlaceBatchOrders(args, client),
|
|
251
|
+
(args) => handlePlaceBatchOrders(args, client, transport),
|
|
248
252
|
);
|
|
249
253
|
}
|
|
@@ -94,7 +94,11 @@ export async function handleCancelAllOrders(
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
export function register(
|
|
97
|
+
export function register(
|
|
98
|
+
server: McpServer,
|
|
99
|
+
client: BudaClient,
|
|
100
|
+
transport: "http" | "stdio" = "stdio",
|
|
101
|
+
): void {
|
|
98
102
|
server.tool(
|
|
99
103
|
toolSchema.name,
|
|
100
104
|
toolSchema.description,
|
|
@@ -110,6 +114,6 @@ export function register(server: McpServer, client: BudaClient): void {
|
|
|
110
114
|
"Any other value will reject the request without canceling.",
|
|
111
115
|
),
|
|
112
116
|
},
|
|
113
|
-
(args) => handleCancelAllOrders(args, client),
|
|
117
|
+
(args) => handleCancelAllOrders(args, client, transport),
|
|
114
118
|
);
|
|
115
119
|
}
|
|
@@ -78,7 +78,11 @@ export async function handleCancelOrder(
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
export function register(
|
|
81
|
+
export function register(
|
|
82
|
+
server: McpServer,
|
|
83
|
+
client: BudaClient,
|
|
84
|
+
transport: "http" | "stdio" = "stdio",
|
|
85
|
+
): void {
|
|
82
86
|
server.tool(
|
|
83
87
|
toolSchema.name,
|
|
84
88
|
toolSchema.description,
|
|
@@ -95,6 +99,6 @@ export function register(server: McpServer, client: BudaClient): void {
|
|
|
95
99
|
"Any other value will reject the request without canceling.",
|
|
96
100
|
),
|
|
97
101
|
},
|
|
98
|
-
(args) => handleCancelOrder(args, client),
|
|
102
|
+
(args) => handleCancelOrder(args, client, transport),
|
|
99
103
|
);
|
|
100
104
|
}
|
|
@@ -112,7 +112,11 @@ export async function handleCancelOrderByClientId(
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
export function register(
|
|
115
|
+
export function register(
|
|
116
|
+
server: McpServer,
|
|
117
|
+
client: BudaClient,
|
|
118
|
+
transport: "http" | "stdio" = "stdio",
|
|
119
|
+
): void {
|
|
116
120
|
server.tool(
|
|
117
121
|
toolSchema.name,
|
|
118
122
|
toolSchema.description,
|
|
@@ -128,6 +132,6 @@ export function register(server: McpServer, client: BudaClient): void {
|
|
|
128
132
|
"Any other value will reject the request without canceling.",
|
|
129
133
|
),
|
|
130
134
|
},
|
|
131
|
-
(args) => handleCancelOrderByClientId(args, client),
|
|
135
|
+
(args) => handleCancelOrderByClientId(args, client, transport),
|
|
132
136
|
);
|
|
133
137
|
}
|
package/src/tools/lightning.ts
CHANGED
|
@@ -204,7 +204,11 @@ export async function handleCreateLightningInvoice(
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
export function register(
|
|
207
|
+
export function register(
|
|
208
|
+
server: McpServer,
|
|
209
|
+
client: BudaClient,
|
|
210
|
+
transport: "http" | "stdio" = "stdio",
|
|
211
|
+
): void {
|
|
208
212
|
server.tool(
|
|
209
213
|
lightningWithdrawalToolSchema.name,
|
|
210
214
|
lightningWithdrawalToolSchema.description,
|
|
@@ -220,7 +224,7 @@ export function register(server: McpServer, client: BudaClient): void {
|
|
|
220
224
|
"Any other value will reject the request without paying.",
|
|
221
225
|
),
|
|
222
226
|
},
|
|
223
|
-
(args) => handleLightningWithdrawal(args, client),
|
|
227
|
+
(args) => handleLightningWithdrawal(args, client, transport),
|
|
224
228
|
);
|
|
225
229
|
|
|
226
230
|
server.tool(
|
package/src/tools/place_order.ts
CHANGED
|
@@ -277,7 +277,11 @@ export async function handlePlaceOrder(
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
export function register(
|
|
280
|
+
export function register(
|
|
281
|
+
server: McpServer,
|
|
282
|
+
client: BudaClient,
|
|
283
|
+
transport: "http" | "stdio" = "stdio",
|
|
284
|
+
): void {
|
|
281
285
|
server.tool(
|
|
282
286
|
toolSchema.name,
|
|
283
287
|
toolSchema.description,
|
|
@@ -335,6 +339,6 @@ export function register(server: McpServer, client: BudaClient): void {
|
|
|
335
339
|
"Any other value will reject the request without placing an order.",
|
|
336
340
|
),
|
|
337
341
|
},
|
|
338
|
-
(args) => handlePlaceOrder(args, client),
|
|
342
|
+
(args) => handlePlaceOrder(args, client, transport),
|
|
339
343
|
);
|
|
340
344
|
}
|
|
@@ -209,7 +209,11 @@ export async function handleCreateReceiveAddress(
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
export function register(
|
|
212
|
+
export function register(
|
|
213
|
+
server: McpServer,
|
|
214
|
+
client: BudaClient,
|
|
215
|
+
transport: "http" | "stdio" = "stdio",
|
|
216
|
+
): void {
|
|
213
217
|
server.tool(
|
|
214
218
|
listReceiveAddressesToolSchema.name,
|
|
215
219
|
listReceiveAddressesToolSchema.description,
|
|
@@ -238,6 +242,6 @@ export function register(server: McpServer, client: BudaClient): void {
|
|
|
238
242
|
.string()
|
|
239
243
|
.describe("Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to generate a new address."),
|
|
240
244
|
},
|
|
241
|
-
(args) => handleCreateReceiveAddress(args, client),
|
|
245
|
+
(args) => handleCreateReceiveAddress(args, client, transport),
|
|
242
246
|
);
|
|
243
247
|
}
|
package/src/tools/remittances.ts
CHANGED
|
@@ -280,7 +280,11 @@ export async function handleAcceptRemittanceQuote(
|
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
export function register(
|
|
283
|
+
export function register(
|
|
284
|
+
server: McpServer,
|
|
285
|
+
client: BudaClient,
|
|
286
|
+
transport: "http" | "stdio" = "stdio",
|
|
287
|
+
): void {
|
|
284
288
|
server.tool(
|
|
285
289
|
listRemittancesToolSchema.name,
|
|
286
290
|
listRemittancesToolSchema.description,
|
|
@@ -311,7 +315,7 @@ export function register(server: McpServer, client: BudaClient): void {
|
|
|
311
315
|
.string()
|
|
312
316
|
.describe("Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to create the quote."),
|
|
313
317
|
},
|
|
314
|
-
(args) => handleQuoteRemittance(args, client),
|
|
318
|
+
(args) => handleQuoteRemittance(args, client, transport),
|
|
315
319
|
);
|
|
316
320
|
|
|
317
321
|
server.tool(
|
|
@@ -321,6 +325,6 @@ export function register(server: McpServer, client: BudaClient): void {
|
|
|
321
325
|
id: z.number().int().positive().describe("The numeric ID of the remittance quote to accept."),
|
|
322
326
|
confirmation_token: z.string().describe("Must be 'CONFIRM' to proceed. Any other value aborts."),
|
|
323
327
|
},
|
|
324
|
-
(args) => handleAcceptRemittanceQuote(args, client),
|
|
328
|
+
(args) => handleAcceptRemittanceQuote(args, client, transport),
|
|
325
329
|
);
|
|
326
330
|
}
|
package/src/tools/withdrawals.ts
CHANGED
|
@@ -254,7 +254,11 @@ export async function handleCreateWithdrawal(
|
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
export function register(
|
|
257
|
+
export function register(
|
|
258
|
+
server: McpServer,
|
|
259
|
+
client: BudaClient,
|
|
260
|
+
transport: "http" | "stdio" = "stdio",
|
|
261
|
+
): void {
|
|
258
262
|
server.tool(
|
|
259
263
|
getWithdrawalHistoryToolSchema.name,
|
|
260
264
|
getWithdrawalHistoryToolSchema.description,
|
|
@@ -283,6 +287,6 @@ export function register(server: McpServer, client: BudaClient): void {
|
|
|
283
287
|
.string()
|
|
284
288
|
.describe("Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."),
|
|
285
289
|
},
|
|
286
|
-
(args) => handleCreateWithdrawal(args, client),
|
|
290
|
+
(args) => handleCreateWithdrawal(args, client, transport),
|
|
287
291
|
);
|
|
288
292
|
}
|