Repository navigation
feat: add read-only lexe.list_payments - #5
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
lexe.list_payments, a read-only MCP tool that pages the caller's wallet history through the existing gateway client. It only issuesGET /user/v1/payments/updatedand 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, andnote. Optional filters:direction,status,since/untiloncreated_at, and a case-insensitivepayer_notesubstring matched againstpayer_noteornote.summary: truereturns the match count and the summed amount instead of the list.The branch started from
feat/direct-gateway-clientand is rebased ontomain(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, passnext_start_indexback asstart_index.Tests
1000.5 + 2000 + 0.5, note aliases (message/personal_note), and an assertion that every node call isGET /user/v1/payments/updated.go testpasses. CI smoke now checks thattools/listadvertises the tool and that a call without credentials isisErrorwithmissing Lexe identity.