Damus
pippellia profile picture
pippellia
In the future I'll be looking at replacing go-nostr, and this seems a good library for it.

Just a few comments:

1) ID, Pubkey, Sig imo should be specific types of [32]byte or [64]byte, all represented as string with the method Hex(). This would allow inspections of individual bytes which I think might be useful.

2) Filter.Limit, when unspecified I think it should be MaxInt, because an unspecified limit means "give me everything". Similar to Since and Until, this would allow to avoid pointer checks and simply using comparison operators.

if filter.Limit > 1000 {
filter.Limit = 1000
}