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

Mint: add websockets for quote updates #413

Merged
merged 49 commits into from
Jun 25, 2024
Merged

Conversation

callebtc
Copy link
Collaborator

@callebtc callebtc commented Feb 10, 2024

This PR implements the new Websocket NUT (cashubtc/nuts#98) on the client and on the server side. At the client side, we use a websocket connection to the mint. This connection sends json-rpc commands with a predefined set of commands. For now, these are only subscription commands. These allow you to subscribe to state updates of melt and mint quotes, and proofs. Clients can subscribe with filters to quote id's (for mint and melt quotes), or to the Proof.Y point (for ecash).

Whenever there is an update, the mint looks up all subscriptions for any of the triggered filters and sends updated Bolt11MintQuote or Bolt11MeltQuote and ProofState objects to the client.

Todos:

@callebtc callebtc merged commit e846acf into main Jun 25, 2024
11 checks passed
@callebtc callebtc deleted the add_websocket_quote_updates branch June 25, 2024 17:20
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

Successfully merging this pull request may close these issues.

1 participant