Repository navigation
nipcash, nipcw: RFC 8785 params strings (changes ph), circle-join max_amount and refusal codes - #123
Merged
Merged
Conversation
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.
Closes #122
Warning
This changes the NIP-CASH params hash (
ph). Params containing<,>,&, U+2028 or U+2029 now hash as RFC 8785 writes them, so a client and a Hub on different sides of this change disagree, and the Hub omits those items. Params without those characters hash exactly as before. Release clients and Hubs (lokihub, cashctl) on the same nmilat.Summary
transport.CanonicalParamsHashwrites strings as RFC 8785 does (NIP-CASH §Item Proofs): only",\and control characters are escaped; keys sorted and numbers verbatim as before.nipcw.CreateCircleWalletResponse.MaxAmountMilliscarries the cap as the Hub resolved it (nil if the Hub did not send it), andnipcwexportsErrNotReady,ErrRestricted,ErrWalletExists,ErrRateLimited(NIP-CW §Errors).Test plan
sha256sum); the spec-named characters fail onmain.max_amountparse test fails when the field is dropped.go vet,go mod tidy, gofmt, golangci-lint v2.13.2, govulncheck,go test -race -count=1 ./...