NUT-21 and NUT-22 matching rules #334

Merged
robwoodgate merged 4 commits from nut21-22-match into main 2026-02-10 14:54:40 +00:00
robwoodgate commented 2026-01-27 20:32:47 +00:00 (Migrated from github.com)

Clarifies protected_endpoints matching rules for NUT-21 and NUT-22

Clarifies `protected_endpoints` matching rules for NUT-21 and NUT-22 - [x] CDK: https://github.com/cashubtc/cdk/pull/1586 - [x] Cashu-TS: https://github.com/cashubtc/cashu-ts/pull/483 - [x] Nutshell: https://github.com/cashubtc/nutshell/pull/885
thesimplekid (Migrated from github.com) reviewed 2026-01-30 12:17:38 +00:00
thesimplekid (Migrated from github.com) left a comment

Looks good. Do you think some test cases would be helpful?

Looks good. Do you think some test cases would be helpful?
@ -210,11 +210,11 @@ The mint lists each protected endpoint that requires a blind authentication toke
"protected_endpoints": [
thesimplekid (Migrated from github.com) commented 2026-01-30 11:47:42 +00:00
      "path": "/v1/mint/*"
```suggestion "path": "/v1/mint/*" ```
thesimplekid (Migrated from github.com) commented 2026-01-30 11:48:05 +00:00
      "path": "/v1/mint/*"

Since we're no longer using regex we should remove the ^.

```suggestion "path": "/v1/mint/*" ``` Since we're no longer using regex we should remove the ^.
robwoodgate commented 2026-01-30 13:15:01 +00:00 (Migrated from github.com)

Looks good. Do you think some test cases would be helpful?

Thanks for removing the prefix anchor - I overlooked that.

Am happy to add tests, but wasn't sure a prefix match needs much more explanation than the example given?

But am too close to it, so if you think it's open to interpretation, then I will.

EDIT: https://github.com/cashubtc/nuts/pull/334/commits/21a0bd362e610003c98516f045423d475ea1e8a0 adds a couple more examples

> Looks good. Do you think some test cases would be helpful? Thanks for removing the prefix anchor - I overlooked that. Am happy to add tests, but wasn't sure a prefix match needs much more explanation than the example given? But am too close to it, so if you think it's open to interpretation, then I will. EDIT: https://github.com/cashubtc/nuts/pull/334/commits/21a0bd362e610003c98516f045423d475ea1e8a0 adds a couple more examples
thesimplekid (Migrated from github.com) approved these changes 2026-01-30 15:06:35 +00:00
thesimplekid (Migrated from github.com) left a comment
LGTM. CDK PR https://github.com/cashubtc/cdk/pull/1586
robwoodgate commented 2026-01-30 16:14:15 +00:00 (Migrated from github.com)
Cashu-TS PR: https://github.com/cashubtc/nuts/pull/334
Sign in to join this conversation.
No description provided.