blitz_api
blitz_api copied to clipboard
Add endpoint to give me a list of recent transactions
I've pushed the first version of this endpoint to the repo. As discussed, it currently is super inefficient. It fetches all invoices, payments and transactions each time the endpoint is hit. Need to find a better way to cache this. Possibly it is a good idea to build this list once on startup and keep it updated when new transactions roll in. All the functionality is there.
We'll keep this issue open until I've implemented the improvements.
@rootzoll important issue
Transactions show up but new transactions need to be provided over SSE as well.
As discussed today this is not an easy task to implement, as it won't work when multiple clients are connected to the SSE endpoint. To make that work we'd have to track a state for each connected client and handle the data accordingly.
Workaround: Client side receives new onchain tx and payments from the SSE endpoint in their native formats, which then must be manually parsed to the unified transaction format.