Skip to content

Add REST API wrapper for escrow creation #23

@crtahlin

Description

@crtahlin

Description

Currently escrow creation requires full MCP SSE client implementation. Many integrators just want simple REST calls.

Current State

Must implement:

  1. SSE connection to MCP server
  2. Session management
  3. Multiple round-trips for prepare/sign/submit

Proposed Solution

Add simple REST endpoints:

POST /api/v1/escrows/prepare
Body: { seller, contentHash, price, expiryDays, ... }
Returns: { unsignedTx, encryptionKey, estimatedGas }

POST /api/v1/escrows/submit  
Body: { signedTx }
Returns: { escrowId, txHash }

Benefits

  • Dramatically simplifies integration
  • Works with any HTTP client
  • Still maintains security (signing happens client-side)
  • Reduces barrier to entry for sellers

Alternative

At minimum, provide a Node.js SDK that wraps the MCP complexity.


Found during seller flow UX testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions