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

NUT-05: Melting tokens without blocking #37

Open
callebtc opened this issue Jul 8, 2023 · 2 comments
Open

NUT-05: Melting tokens without blocking #37

callebtc opened this issue Jul 8, 2023 · 2 comments

Comments

@callebtc
Copy link
Contributor

callebtc commented Jul 8, 2023

Currently, calling POST /melt is blocking until either the Lightning invoice succeeds or fails. This is not necessary anymore because we now have a new pending state in the POST /check response (see here: #21).

POST /melt should have an option to immediately return. I'm unsure what the best way would be to spec this out.

Input is very much appreciated.

Options:

  • POST /melt?blocking=false with a URL param
  • PostMeltRequest with optional blocking: false field in json
  • New endpoint a la POST /melt/async
  • Use the HTTP Header Prefer: respond-async
@gohumble
Copy link
Contributor

Have you thought about using the HTTP Header Prefer: respond-async from RFC7240?

@callebtc
Copy link
Contributor Author

Have you thought about using the HTTP Header Prefer: respond-async from RFC7240?

I didn't know about that, will add it as a fourth option :)

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