thesimplekid / cln-nostr-wallet-connect

Core lighting plugin for NIP47 nostr connect support
BSD 3-Clause "New" or "Revised" License
14 stars 1 forks source link

Add test for authoritzation and limits #12

Open Sjors opened 4 months ago

Sjors commented 4 months ago

The more tests the better of course, but this like the most security critical part:

https://github.com/thesimplekid/cln-nostr-wallet-connect/blob/6450ad99c3ae3eabd2870c0805ff7ef8369702a3/src/main.rs#L239-L285

Maybe these lines can go in a helper function and then the tests can check that it returns true / false depending on some test vectors?