feat(mint): implement Mint Quote Lookup by Public Key#977
Open
a1denvalu3 wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #977 +/- ##
==========================================
+ Coverage 75.14% 75.23% +0.08%
==========================================
Files 99 99
Lines 11714 11757 +43
==========================================
+ Hits 8803 8845 +42
- Misses 2911 2912 +1 ☔ View full report in Codecov by Sentry. |
6596c77 to
91fe53e
Compare
91fe53e to
d8e9bbd
Compare
Contributor
|
i feel like the commit msg is misleading: d8e9bbd |
b-l-u-e
reviewed
May 21, 2026
| if not verify_schnorr_signature( | ||
| bytes.fromhex(pubkey), pk, bytes.fromhex(signature) | ||
| ): | ||
| raise Exception(f"invalid signature for pubkey {pubkey}") |
Contributor
There was a problem hiding this comment.
Invalid signature should raise QuoteSignatureInvalidError or a dedicated lookup error with code not Exception i think
b-l-u-e
reviewed
May 21, 2026
Comment on lines
+439
to
+440
| if len(pubkeys) != len(pubkey_signatures): | ||
| raise Exception("pubkeys and pubkey_signatures must have the same length") |
Contributor
There was a problem hiding this comment.
Length mismatch raises generic Exception maybe use CashuError
b-l-u-e
reviewed
May 21, 2026
| f"{BASE_URL}/v1/mint/quote/bolt11/pubkey", | ||
| json={"pubkeys": [pubkey], "pubkey_signatures": [bad_signature]}, | ||
| ) | ||
| assert response.status_code == 400 or response.status_code == 500 |
Contributor
There was a problem hiding this comment.
i think assert should be exactl 400, not 400 or 500.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements https://github.com/cashubtc/nuts/pull/341/changes