Skip to content

feat: add read-only lexe.list_payments - #5

Merged
vincenzopalazzo merged 1 commit into
mainfrom
cursor/list-payments-7ad0
Oct 23, 2026
Merged

vincenzopalazzo merged 1 commit into
mainfrom
cursor/list-payments-7ad0

Conversation

@vincenzopalazzo

Copy link
Copy Markdown
Owner

Summary

Adds lexe.list_payments, a read-only MCP tool that pages the caller's wallet history through the existing gateway client. It only issues GET /user/v1/payments/updated and never calls a pay, offer, or proof endpoint.

Each payment includes index, id, direction, status, amount_sats (sats string, fractional sats allowed), fees, created_at, finalized_at, payer_note, and note. Optional filters: direction, status, since/until on created_at, and a case-insensitive payer_note substring matched against payer_note or note. summary: true returns the match count and the summed amount instead of the list.

The branch started from feat/direct-gateway-client and is rebased onto main (that gateway work is already merged).

Example

OCEAN pool payouts — inbound, completed, payer note contains OCEAN lightning payout:

{
  "direction": "inbound",
  "status": "completed",
  "payer_note": "OCEAN lightning payout",
  "summary": true
}
{
  "ok": true,
  "count": 2,
  "amount_sats": "3000.5",
  "scanned": 5,
  "truncated": false
}

A list call returns the same filters plus payments. When more history remains, pass next_start_index back as start_index.

Tests

  • Hermetic fake gateway: multi-page cursor, summary total 1000.5 + 2000 + 0.5, note aliases (message / personal_note), and an assertion that every node call is GET /user/v1/payments/updated.
  • Unit coverage for amount formatting, time bounds, filter parsing, and the missing-identity error.
  • go test passes. CI smoke now checks that tools/list advertises the tool and that a call without credentials is isError with missing Lexe identity.
Open in Web Open in Cursor 

Page GET /user/v1/payments/updated so a caller can filter payment
history and total inbound payouts without a pay path.

Co-authored-by: Vincenzo Palazzo <vincenzopalazzo@member.fsf.org>
@vincenzopalazzo
vincenzopalazzo merged commit a3b5b48 into main Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants