cascrow-mcp 1.1.1 → 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 +34 -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:
@@ -301,6 +319,7 @@ async function handleCreateContract({ milestones }) {
301
319
 
302
320
  return {
303
321
  contractId: data.contractId,
322
+ inviteCode: data.inviteLink,
304
323
  contractUrl,
305
324
  milestoneCount: milestones.length,
306
325
  message: `Contract created with ${milestones.length} milestone(s). View it here: ${contractUrl}`,
@@ -318,6 +337,18 @@ async function handleFundMilestone({ contractId, milestoneId }) {
318
337
  };
319
338
  }
320
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
+
321
352
  async function handleSubmitProof({ milestoneId, proof, filename }) {
322
353
  const data = await uploadProof(
323
354
  milestoneId,
@@ -433,6 +464,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
433
464
  case "cascrow_fund_milestone":
434
465
  result = await handleFundMilestone(args);
435
466
  break;
467
+ case "cascrow_escrow_fund":
468
+ result = await handleEscrowFund(args);
469
+ break;
436
470
  case "cascrow_submit_proof":
437
471
  result = await handleSubmitProof(args);
438
472
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cascrow-mcp",
3
- "version": "1.1.1",
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",