0xtrr / cherry-server

A media server implementing the Blossom protocol.
3 stars 1 forks source link

Refactor to use nostr-sdk for event handling #4

Closed 0xtrr closed 2 weeks ago

0xtrr commented 2 weeks ago

Adds nostr-sdk crate to dependencies. Refactors code to make use of nostr-sdk Event struct instead of custom AuthEvent struct. This gives us a bunch of functionality, specifically signature verification which was the main purpose of this change.

I've also refactored the custom Axum header extractor to do event signature verification. In this change, I also cleaned up the code a bit to make it more readable.