Not sure why, but on #amethyst, the npub regex in my note is not being rendered in full. There is an odd colon in place of some of the text.
https://nostrcheck.me/media/public/nostrcheck.me_5661105604796675421705423822.webp
The pubkey would just be a 32-byte hex-encoded string, which will always be 64 hex characters in length since 2 hex characters represents 1 byte.
So, pubkey regex is:
[0-9a-fA-F]{64}
For the npub, I believe that is always a consistent length of npub1 + 58 bech32-encoded characters (not bech32m).
So, npub regex is:
npub1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{58}
Possible that I am wrong about the public length, but I have yet to come across one of a different length.
Also, validating whether the values decode to a valid secp256k1 key is not something that you could do w/ regex.
Thanks for sharing! If no one responds back to me, then I'll just have to open a ticket on github tonight 😁 Which I might do anyway as a formality since it really should be documented for us devs.
Nostr Dev Question:
When serializing an event to generate the hash ID, how should tags be ordered?
I cannot find anything under NIP-01 for this.
Currently, I am storing metadata external to the event to keep track of the tag order respective of how it was received, but that doesn't seem optimal.
Is there a recommended standard? Maybe alphabetical based on the UTF8 serialized strings of each tag? Although, that is certainly less optimal since that would require individual serialization of each tag plus a string compare sort.
#nostrdev #nostrdevs #devstr #nip01 #asknostr
Watching the Iowa caucus and realized that no one voted for Pedro.
#iowa #voteforpedro #trump #haley #politics #dynamite
Trademark it!
Finally broke 20 followers on Nostr! Do I get a YouTube Play Button plaque for that?
#nostr #grownostr #notyoutube
Who is excited for Iowa? 🙄 #politics #primary #2024
It's good when it's good. But when the BTCUSD exchange rate moves south against the $USD is when you experience that $USD inflation to the exponential.
One of the reasons that I am glad to be moving to FL later this year.
Successfully spent the afternoon setting up my first Bitcoin cold storage wallet using a Coldcard. Thanks, nostr:npub1qny3tkh0acurzla8x3zy4nhrjz5zd8l9sy9jys09umwng00manysew95gx and nostr:npub1az9xj85cmxv8e9j9y80lvqp97crsqdu2fpu3srwthd99qfu9qsgstam8y8 🙏🏼
Centralized exchanges are good for on-ramps and off-ramps. Nothing else.
Excellent! That's the move everyone should make.
I'm cooking up some yummy curry chicken. And by "I'm", I mean "my husband is". Otherwise, it wouldn't be that yummy 😅
#m=image%2Fjpeg&dim=960x720&blurhash=%23eHU%2CzI%5DaeWBfhRkWUWBWB%7EUSjWVWCbFV%5BWUWBWB-lX8WVWCWBWCWBaeWB%24yWBofV%5BWUazbHa%23WWxYj%5BWBV%5BfPaybIa%23j%5Ds%2BoeR*WBofj%5DbHjZj%5Bn%24jYa%24ofkCa%7Dayaya%7C&x=e51a00b9ee1ef3bad5779375f3aaa47ab2ad61380bb751276548b8337e052332