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

Feature request: Use NUT-19 cached responses #263

Open
callebtc opened this issue Dec 12, 2024 · 0 comments
Open

Feature request: Use NUT-19 cached responses #263

callebtc opened this issue Dec 12, 2024 · 0 comments

Comments

@callebtc
Copy link
Collaborator

cashu-ts allows implementors to overload the request method which could be used to implement NUT-19 for storing requests in order to replay them in case of a network-related error:

I imagine the flow to be the following, exemplified in a swap request (should also be similar for melt and mint):

  • choose inputs, outputs to a swap, generate blind messages and blinding factors
  • store blinding factors (and possibly other data that's required to finalize the swap)
  • call the swap endpoint with custom request module
  • custom request module stores the request in the database together with blinding factors (and possibly other data)
  • if the call is successful, continue with un-blinding response with blinding factors from db and return proofs
  • if the call fails, allow a replay of the request from the database and finalize if successful
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

1 participant