@escro/mcp 0.1.4 → 0.1.5

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 CHANGED
@@ -24,12 +24,18 @@ escrows. No wallet, no authentication, no setup.
24
24
  | Mainnet | `https://api.escro.ai/mcp` |
25
25
  | Devnet | `https://api-devnet.escro.ai/mcp` |
26
26
 
27
- Claude Code / Claude Desktop:
27
+ Claude Code:
28
+
29
+ ```bash
30
+ claude mcp add --transport http escro https://api.escro.ai/mcp
31
+ ```
32
+
33
+ or in `.mcp.json`:
28
34
 
29
35
  ```json
30
36
  {
31
37
  "mcpServers": {
32
- "escro": { "type": "url", "url": "https://api.escro.ai/mcp" }
38
+ "escro": { "type": "http", "url": "https://api.escro.ai/mcp" }
33
39
  }
34
40
  }
35
41
  ```
@@ -47,7 +53,8 @@ Cursor:
47
53
  ### Local, full read and write (with a wallet)
48
54
 
49
55
  Run the server locally with a funded Solana wallet to create escrows, claim tasks,
50
- submit deliverables, and release payment. The server speaks stdio.
56
+ submit deliverables, and release payment. The server speaks stdio. Requires Node.js 22 or
57
+ later.
51
58
 
52
59
  ```bash
53
60
  npx @escro/mcp
@@ -88,7 +95,8 @@ wallet-less by construction and never registers them.
88
95
 
89
96
  ## Tools
90
97
 
91
- The read tools (escrows, EscroBots discovery, EscroRep) are always registered. The write
98
+ The read tools (escrows, EscroBots discovery, EscroRep) are always registered;
99
+ `verify_escrow_onchain` is registered only by a local server, never the hosted endpoint. The write
92
100
  tools, which sign and send transactions, are registered only when `ESCRO_WALLET_SECRET` is
93
101
  set. Every tool maps one to one onto an `@escro/sdk` method; the MCP layer holds no business
94
102
  logic of its own. Each tool carries MCP annotations (`title`, `readOnlyHint`,
package/dist/env.cjs CHANGED
@@ -2304,6 +2304,27 @@ var ESCROW_INSTRUCTIONS = {
2304
2304
  arbitration_release: spec([118, 157, 141, 26, 104, 117, 94, 229], 4, "ARBITRATION_RELEASE"),
2305
2305
  arbitration_refund: spec([255, 194, 84, 248, 185, 249, 120, 122], 4, "ARBITRATION_REFUND")
2306
2306
  };
2307
+ var NON_ESCROW_INSTRUCTIONS = {
2308
+ initialize_platform: Uint8Array.from([119, 201, 101, 45, 75, 122, 89, 3]),
2309
+ initialize_admin_config: Uint8Array.from([133, 214, 35, 2, 50, 232, 95, 164]),
2310
+ close_platform: Uint8Array.from([27, 145, 216, 122, 13, 15, 46, 201]),
2311
+ update_platform: Uint8Array.from([46, 78, 138, 189, 47, 163, 120, 85]),
2312
+ set_admin_authority: Uint8Array.from([72, 49, 37, 167, 149, 98, 49, 174]),
2313
+ migrate_escrow_v1_to_v2: Uint8Array.from([70, 76, 99, 21, 154, 50, 111, 221])
2314
+ };
2315
+ var RETIRED_INSTRUCTIONS = {
2316
+ claim_open_task: Uint8Array.from([31, 61, 16, 69, 194, 74, 72, 148])
2317
+ };
2318
+ var ANCHOR_IDL_INSTRUCTION_TAG = Uint8Array.from([
2319
+ 64,
2320
+ 244,
2321
+ 188,
2322
+ 120,
2323
+ 167,
2324
+ 233,
2325
+ 105,
2326
+ 10
2327
+ ]);
2307
2328
 
2308
2329
  // ../sdk/dist/index.js
2309
2330
  var import_web3 = require("@solana/web3.js");
@@ -2315,8 +2336,8 @@ var import_bs586 = __toESM(require("bs58"), 1);
2315
2336
  var import_web32 = require("@solana/web3.js");
2316
2337
  var import_bs587 = __toESM(require("bs58"), 1);
2317
2338
  var import_web33 = require("@solana/web3.js");
2318
- var import_bs588 = __toESM(require("bs58"), 1);
2319
2339
  var import_web34 = require("@solana/web3.js");
2340
+ var import_bs588 = __toESM(require("bs58"), 1);
2320
2341
  var import_bs589 = __toESM(require("bs58"), 1);
2321
2342
  var import_bs5810 = __toESM(require("bs58"), 1);
2322
2343
  var import_web35 = require("@solana/web3.js");
@@ -2385,6 +2406,27 @@ var ESCROW_INSTRUCTIONS2 = {
2385
2406
  arbitration_release: spec2([118, 157, 141, 26, 104, 117, 94, 229], 4, "ARBITRATION_RELEASE"),
2386
2407
  arbitration_refund: spec2([255, 194, 84, 248, 185, 249, 120, 122], 4, "ARBITRATION_REFUND")
2387
2408
  };
2409
+ var NON_ESCROW_INSTRUCTIONS2 = {
2410
+ initialize_platform: Uint8Array.from([119, 201, 101, 45, 75, 122, 89, 3]),
2411
+ initialize_admin_config: Uint8Array.from([133, 214, 35, 2, 50, 232, 95, 164]),
2412
+ close_platform: Uint8Array.from([27, 145, 216, 122, 13, 15, 46, 201]),
2413
+ update_platform: Uint8Array.from([46, 78, 138, 189, 47, 163, 120, 85]),
2414
+ set_admin_authority: Uint8Array.from([72, 49, 37, 167, 149, 98, 49, 174]),
2415
+ migrate_escrow_v1_to_v2: Uint8Array.from([70, 76, 99, 21, 154, 50, 111, 221])
2416
+ };
2417
+ var RETIRED_INSTRUCTIONS2 = {
2418
+ claim_open_task: Uint8Array.from([31, 61, 16, 69, 194, 74, 72, 148])
2419
+ };
2420
+ var ANCHOR_IDL_INSTRUCTION_TAG2 = Uint8Array.from([
2421
+ 64,
2422
+ 244,
2423
+ 188,
2424
+ 120,
2425
+ 167,
2426
+ 233,
2427
+ 105,
2428
+ 10
2429
+ ]);
2388
2430
  var MAX_PUBKEY_CHARS = 44;
2389
2431
  function isCanonicalPubkey(s) {
2390
2432
  try {
@@ -2529,6 +2571,70 @@ var ESCROW_INSTRUCTIONS22 = {
2529
2571
  arbitration_release: spec22([118, 157, 141, 26, 104, 117, 94, 229], 4, "ARBITRATION_RELEASE"),
2530
2572
  arbitration_refund: spec22([255, 194, 84, 248, 185, 249, 120, 122], 4, "ARBITRATION_REFUND")
2531
2573
  };
2574
+ var NON_ESCROW_INSTRUCTIONS22 = {
2575
+ initialize_platform: Uint8Array.from([119, 201, 101, 45, 75, 122, 89, 3]),
2576
+ initialize_admin_config: Uint8Array.from([133, 214, 35, 2, 50, 232, 95, 164]),
2577
+ close_platform: Uint8Array.from([27, 145, 216, 122, 13, 15, 46, 201]),
2578
+ update_platform: Uint8Array.from([46, 78, 138, 189, 47, 163, 120, 85]),
2579
+ set_admin_authority: Uint8Array.from([72, 49, 37, 167, 149, 98, 49, 174]),
2580
+ migrate_escrow_v1_to_v2: Uint8Array.from([70, 76, 99, 21, 154, 50, 111, 221])
2581
+ };
2582
+ var RETIRED_INSTRUCTIONS22 = {
2583
+ claim_open_task: Uint8Array.from([31, 61, 16, 69, 194, 74, 72, 148])
2584
+ };
2585
+ var ANCHOR_IDL_INSTRUCTION_TAG22 = Uint8Array.from([
2586
+ 64,
2587
+ 244,
2588
+ 188,
2589
+ 120,
2590
+ 167,
2591
+ 233,
2592
+ 105,
2593
+ 10
2594
+ ]);
2595
+ var ESCROW_ACCOUNT_ALLOCATIONS = { 1: 537, 2: 672 };
2596
+ var ESCROW_ACCOUNT_V1_FIELDS = [
2597
+ { name: "version", kind: "u8" },
2598
+ { name: "buyer", kind: "pubkey" },
2599
+ { name: "assigned_worker", kind: "option<pubkey>" },
2600
+ { name: "task_id", kind: "string" },
2601
+ { name: "amount_usdc", kind: "u64" },
2602
+ { name: "fee_bps", kind: "u16" },
2603
+ { name: "deadline", kind: "i64" },
2604
+ { name: "spec_hash", kind: "string" },
2605
+ { name: "deliverable_hash", kind: "option<string>" },
2606
+ { name: "proof_uri", kind: "option<string>" },
2607
+ { name: "state", kind: "state" },
2608
+ { name: "created_at", kind: "i64" },
2609
+ { name: "updated_at", kind: "i64" },
2610
+ { name: "submitted_at", kind: "option<i64>" },
2611
+ { name: "min_amount", kind: "u64" },
2612
+ { name: "bump", kind: "u8" },
2613
+ { name: "marketplace_id", kind: "option<string>" },
2614
+ { name: "referrer_wallet", kind: "option<pubkey>" },
2615
+ { name: "referrer_bps", kind: "u16" }
2616
+ ];
2617
+ var ZERO_KEY = import_bs5810.default.encode(new Uint8Array(32));
2618
+ var ZERO_HEX32 = "0".repeat(64);
2619
+ var FIELD_KINDS = [
2620
+ "pubkey",
2621
+ "u8",
2622
+ "u16",
2623
+ "u64",
2624
+ "i64",
2625
+ "string",
2626
+ "option<pubkey>",
2627
+ "option<string>",
2628
+ "option<i64>"
2629
+ ];
2630
+ function fieldKind(kind) {
2631
+ if (kind === "state") return "enum";
2632
+ const found = FIELD_KINDS.find((k) => k === kind);
2633
+ if (found === void 0) throw new Error(`no version-1 EscrowAccount field is of kind ${kind}`);
2634
+ return found;
2635
+ }
2636
+ var ESCROW_ACCOUNT_LAYOUT = ESCROW_ACCOUNT_V1_FIELDS.map(({ name, kind }) => ({ name, kind: fieldKind(kind) }));
2637
+ var ESCROW_ACCOUNT_SIZE = ESCROW_ACCOUNT_ALLOCATIONS[1];
2532
2638
  var STATE_OF = {
2533
2639
  Created: EscrowState.CREATED,
2534
2640
  Funded: EscrowState.FUNDED,