nostr_rust icon indicating copy to clipboard operation
nostr_rust copied to clipboard

1.0.0

Open 0xtlt opened this issue 3 years ago • 2 comments

I think to take advantage of this breaking change to change the "vision" of this lib.

Make it async first, and make the "blocking" (sync) part optional. It would be easier to maintain.

And also work on the subscription of events to offer a better development experience.

What do you think ?

0xtlt avatar Jan 14 '23 09:01 0xtlt

I think making it async first makes sense.

Two things I've noticed that may be worth changing here.

  • Kind is currently a u16 this supports current kinds that have a spec but there is nothing in the NIPs that set a max kind value. It may be worth bumping it up to a u32 or u64 as people may just use random high numbers for kinds for example JB55's git tools uses kind 19691228 so it causes an error on this crate.

  • The other is I'm less convinced now then a few weeks ago that POW with be the standard event. So it may make sense to remove the POW difficulty from every functions, and have POW specific functions. Not a strong opinion here, not a huge deal to have an extra argument but thought it was worth mentioning.

thesimplekid avatar Jan 14 '23 14:01 thesimplekid

For the POW, I think I will move it back to the original code you made @thesimplekid with a "convert" function

0xtlt avatar Jan 14 '23 15:01 0xtlt