Closed thesimplekid closed 8 months ago
Is this one still a draft @thesimplekid? Changes look good to me, except that some are also implemented in #79. Happy to give final review once you're happy with it and set it as ready for review.
@thunderbiscuit Thanks for having a look.
So the issue with adding the escape chars is it changes the secret, so the witness needs to be updated. I ran into this issue when implementing nostr nip57, where if the secret goes through any serialization or de-serialization, it wont match the original secret the signature is on, so the signature check needs to be on the original secret string. However we still need to be able to de-serialize the secret and but this can be difficult if the json is malformed since the rust crate i use for json, serde, is quite strict with json formatting for example I can't de-serialize this secret because of the trailing comma. So I would prefer to be as strict as possible with json formatting at least in the spec and test-vectors.
I'll rebase this to remove the duplicated fixes and leave the json formatting up for discussion, but it shouldn't be merged as is since the signature is not valid.
close for #96
TODO:
Note: Going to leave this as a draft in case I find anything else while implementing.
fixes: https://github.com/cashubtc/nuts/issues/61#issue-1966893496