Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc: Add "created_at" to listInvoices rpc #7168

Open
michaelWuensch opened this issue Mar 23, 2024 · 2 comments
Open

grpc: Add "created_at" to listInvoices rpc #7168

michaelWuensch opened this issue Mar 23, 2024 · 2 comments
Labels

Comments

@michaelWuensch
Copy link

I try to display a nice transaction history, but I cannot insert an unpaid invoice into the timeline at the correct position, as there is no information on when it was created.

Either a "created_at" timestamp is needed, or an "expiry" field has to be provided.
In the second case I could calculate the created_at by doing "expires_at" - "expiry".

Link to the docs for the enpoint that needs the change:
https://docs.corelightning.org/reference/lightning-listinvoices

@daywalker90
Copy link
Contributor

atleast the correct position should be possible using the existing created_index field?

@michaelWuensch
Copy link
Author

michaelWuensch commented Apr 19, 2024

@daywalker90
the correct position in regards to other invoices yes. But in my app the transaction history shows on-chain events, payments & invoices in a single timeline. Therefore I need to order it by date, not by an index that only applies to invoices.
Furthermore I always display the time for an event, which is not possible either with the created_index.

I already solved the problem by decoding the bolt11 string and extracting the timestamp from there. But the performance would be better if it was included in the api response and it would be easier for other 3rd parties to use the api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants