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

How to subscribe the status of invoice #259

Open
ahonn opened this issue Oct 21, 2024 · 3 comments
Open

How to subscribe the status of invoice #259

ahonn opened this issue Oct 21, 2024 · 3 comments
Assignees

Comments

@ahonn
Copy link

ahonn commented Oct 21, 2024

I can only see the relevant RPC methods for the "new_invoice" and "parse_invoice" in https://github.com/nervosnetwork/fiber/blob/main/src/rpc/README.md.

When the invoice I created is paid or the status changes, how can I subscribe to the status change? Is there an RPC method that provides a "SubscribeInvoices" method similar to https://github.com/lightningnetwork/lnd/blob/master/lnrpc/README.md?

@chenyukang
Copy link
Collaborator

there will be query rpc get_invoice which can get the status of invoice.
currently pending on PR: #239

@ahonn
Copy link
Author

ahonn commented Nov 1, 2024

I tried out get_invoice on the main branch, and it works great.

Is there any chance we’ll get something like list_invoices in the future? Right now, if I didn’t save the payment_hash, I can’t get back the invoices that were created before.

@chenyukang chenyukang self-assigned this Nov 13, 2024
@chenyukang
Copy link
Collaborator

yes, we can add a list_invoice rpc.

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

No branches or pull requests

2 participants