Problem
The wallet (and any client) currently needs to make two separate requests — /transfers/incoming/:address and /transfers/outgoing/:address — then merge and sort the results client-side. This doubles the request count and pushes sorting logic onto every consumer.
Proposed solution
Add a new endpoint:
GET /transfers/address/:address
Returns both incoming and outgoing transfers in a single response, sorted by ledger descending.
Response shape:
{
"total": 42,
"limit": 50,
"offset": 0,
"transfers": [
{
"id": 1,
"eventType": "transfer",
"direction": "incoming",
"fromAddress": "G...",
"toAddress": "C...",
"amount": "100000000",
"ledger": 1794688,
"ledgerClosedAt": "2025-01-01T00:00:00Z",
"txHash": "abc123",
"contractId": "C..."
}
]
}
A direction field ("incoming" | "outgoing") should be added to each record so clients can still distinguish direction.
Supports all existing query params: contractId, fromLedger, toLedger, limit, offset.
Acceptance criteria
Problem
The wallet (and any client) currently needs to make two separate requests —
/transfers/incoming/:addressand/transfers/outgoing/:address— then merge and sort the results client-side. This doubles the request count and pushes sorting logic onto every consumer.Proposed solution
Add a new endpoint:
Returns both incoming and outgoing transfers in a single response, sorted by
ledgerdescending.Response shape:
{ "total": 42, "limit": 50, "offset": 0, "transfers": [ { "id": 1, "eventType": "transfer", "direction": "incoming", "fromAddress": "G...", "toAddress": "C...", "amount": "100000000", "ledger": 1794688, "ledgerClosedAt": "2025-01-01T00:00:00Z", "txHash": "abc123", "contractId": "C..." } ] }A
directionfield ("incoming"|"outgoing") should be added to each record so clients can still distinguish direction.Supports all existing query params:
contractId,fromLedger,toLedger,limit,offset.Acceptance criteria
GET /transfers/address/:addressreturns merged results sorted byledgerdescdirectionfield/incomingand/outgoingendpoints unchanged