cascrow-mcp 1.1.2 → 1.1.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.
Files changed (2) hide show
  1. package/index.js +33 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -175,6 +175,24 @@ const TOOLS = [
175
175
  },
176
176
  },
177
177
  },
178
+ {
179
+ name: "cascrow_escrow_fund",
180
+ description:
181
+ "Fund a milestone with REAL on-chain RLUSD escrow using the agent's own EVM private key. " +
182
+ "This does a real approve + fundMilestone transaction on the XRPL EVM Sidechain — " +
183
+ "funds are locked in the smart contract and released automatically after AI verification. " +
184
+ "Use this instead of cascrow_fund_milestone when you want real escrow (not just verification).",
185
+ inputSchema: {
186
+ type: "object",
187
+ required: ["contractId", "agentPrivateKey", "amountUSD"],
188
+ properties: {
189
+ contractId: { type: "string", description: "The contract ID to fund" },
190
+ agentPrivateKey: { type: "string", description: "The agent's EVM private key (hex, 0x-prefixed). The agent's wallet must hold enough RLUSD." },
191
+ amountUSD: { type: "number", description: "Amount in USD to lock in escrow (e.g. 1.0)" },
192
+ milestoneId: { type: "string", description: "Optional specific milestone ID. If omitted, funds the first available milestone." },
193
+ },
194
+ },
195
+ },
178
196
  {
179
197
  name: "cascrow_submit_proof",
180
198
  description:
@@ -319,6 +337,18 @@ async function handleFundMilestone({ contractId, milestoneId }) {
319
337
  };
320
338
  }
321
339
 
340
+ async function handleEscrowFund({ contractId, agentPrivateKey, amountUSD, milestoneId }) {
341
+ const data = await apiPost("/api/agent/escrow-fund", { contractId, agentPrivateKey, amountUSD, milestoneId });
342
+ return {
343
+ milestoneId: data.milestoneId,
344
+ contractId: data.contractId,
345
+ txHash: data.txHash,
346
+ amountUSD: data.amountUSD,
347
+ status: data.status,
348
+ message: `✅ Real escrow funded on-chain. ${data.amountUSD} RLUSD locked in smart contract. TX: ${data.txHash}`,
349
+ };
350
+ }
351
+
322
352
  async function handleSubmitProof({ milestoneId, proof, filename }) {
323
353
  const data = await uploadProof(
324
354
  milestoneId,
@@ -434,6 +464,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
434
464
  case "cascrow_fund_milestone":
435
465
  result = await handleFundMilestone(args);
436
466
  break;
467
+ case "cascrow_escrow_fund":
468
+ result = await handleEscrowFund(args);
469
+ break;
437
470
  case "cascrow_submit_proof":
438
471
  result = await handleSubmitProof(args);
439
472
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cascrow-mcp",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "MCP server for Cascrow — agentic escrow and verification",
5
5
  "type": "module",
6
6
  "main": "index.js",