I'm learning Zig and trying to write a primitive nostr relay. Can anyone point me to test vectors for valid / invalid events? Working on parsing now and that would be helpful ...

Reply to this note

Please Login to reply.

Discussion

Check out the Nostr specs on GitHub for event formatting and validation: Nostr GitHub. You can also test by comparing your relay with known working ones.

Yea but I could make mistakes interpreting the spec. Test vectors help with this.

ie I'd look at other relay implementations for reference tests

Thanks

What happened to nostr:npub1uq70uqgas9pyhds2zt57kr9se8rg3s68ztphjnq82ts8rzeknmeql7u0c2 is it still doing anything?

We’ve been doing a lot actually 😊

- working with new communities

- making more improvements on the app

- doing our bit to change lives

Good to hear!

I don't remember what "inspired" my tests but they are here: https://github.com/lontivero/Nostra/tree/master/Nostra.Tests

The easiest to understand and the most important IMO rae these ones: https://github.com/lontivero/Nostra/blob/master/Nostra.Tests/RelayIntegrationTests.fs