-
Notifications
You must be signed in to change notification settings - Fork 31
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
Bug: Library does not return errors for receive
#130
Comments
swap
receive
@callebtc looking at the I don't think the Secondly regarding the let me know your thoughts on this @callebtc @gandlafbtc |
I think we should aim to simplify the datastructure of tokens to not allow multiple tokens inside a token. Reasons:
|
#86 has some additional discussion on this topic |
@gandlafbtc as per the issue closed on #86 this issue can be closed out too, correct? |
The api has been simplified and now either throws an error or returns the successfully swapped proofs. I think this can be closed @gandlafbtc |
cashu-ts
tries to receive multiple tokens from multiple mints at once and returns tokens with errors inreceive
. I think this is not a great approach because the implementor does not receive the error.I am also not sure if the treatment of the
counter
for deterministic derivation still would work as intended. Thecounter
should depend on the keyset which implies that a function using it should only create outputs of a single keyset, otherwise that function would need multiple counters.I would suggest that the library should only receive tokens from a single mint with
receive
and multiple mints should be handled by an additional function. That meansreceive
can return the error to the implementor. We should also check other functions that do not return errors and make them return it.Any thoughts on this @gandlafbtc?
I'm c/p the relevant code here to make it easier to reason about:
The text was updated successfully, but these errors were encountered: