-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
including nostr specialized types #409
including nostr specialized types #409
Conversation
Is this ready to merge? |
In my view yes, but I'm nobody. |
Yes, except the types should be called "npub" not "npublic", "nsec" not "nsecret", but I can fix that after I merge. |
so, maybe |
I've changed the names in types, type guards and in the included unit tests |
I'll take a look at this soon, if I don't forget. Thank you. |
Thank you for Nostr sir, |
It does hurt my ability to understand my own library. |
Naming types is overrated. It's better to just copy the same type in multiple places, unless it's a truly universal interface. |
ok |
Another thing... Make sense include this in nip5.ts? export const isNip05 = (value?: string | null): value is Nip05 => NIP05_REGEX.test(value || '') |
Yes. In nip.ts |
|
NIP05_REGEX is wrong, I learned after looking at NIP-05 itself. It's too lenient. I was following what the person had done before, but the Btw I think this is still a pointless type. |
Thank you, but I can't see they as pointless types, I see a lot of value in this. |
nrelay got deprecated, so I should remove nrelay from this pr, right? Nostrify uses NRelay name for a symbol too, removing this will avoid package conflit. |
you just merged it, but I found a problem in isNcryptsec guard, it is returning 'is Note' instead is Ncryptsec 😳😥 |
exporting nip19 nostr specific types, implements: #408