What is Nostr?
Richard Schneeman /
npub1tjf…8266
2025-02-11 15:50:23
in reply to nevent1q…gvne

Richard Schneeman on Nostr: nprofile1q…cp3s2 But it's hacky because there's no guarantee that the deserializer ...

nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpqqtfvdrmuyd4xsllc5ktqnxhe556m2yl66pxkaktpmnk92frtlu7qtcp3s2 (nprofile…p3s2) But it's hacky because there's no guarantee that the deserializer doesn't advance past the document. Also...global state.

Here's an implemented version that works:

https://gist.github.com/schneems/d3b91deabe7c5e29d9d5c568227a0fe6

V2 would be to move that data to not be global but instead be behind some interior mutability like an Arc::Mutex so you can pass something into the Deserializer and retain a reference
Author Public Key
npub1tjf3426t659w7x8yl44z2l948wmslmsp2pnta2gs9tp84r3rpawqfx8266