Fun fact, Kind 0 (User Profile Metadata) is such an old, scappy pre-nips nostr relic that there isn't even a NIP describing how to put your lightning address in your profile data.
Everything was made up. It's time to fix this shit, @npub180cv...h6w6
Login to reply
Replies (12)
Let’s do it on NostrHub.io and let WoT sort it out
@ManiMe
Lembre de colocar a possibilidade de pôr outros endereços L2.
To illustrate how bad kind0 is sometimes below is a real function I wrote (unfortunately) like 2 years ago to get users fields from their profile:
export const findKind0Fields = async kind0 => {
let fields = {};
const usernameProperties = ['name', 'displayName', 'display_name', 'username', 'handle', 'alias'];
const pubkeyProperties = ['pubkey', 'npub', '_pubkey'];
const findTruthyPropertyValue = (object, properties) => {
for (const property of properties) {
if (object?.[property]) {
return object[property];
}
}
return null;
};
const username = findTruthyPropertyValue(kind0, usernameProperties);
if (username) {
fields.username = username;
}
const avatar = findTruthyPropertyValue(kind0, [
'picture',
'avatar',
'profilePicture',
'profile_picture',
'image',
]);
if (avatar) {
fields.avatar = avatar;
}
const pubkey = findTruthyPropertyValue(kind0, pubkeyProperties);
if (pubkey) {
fields.pubkey = pubkey;
}
const lud16 = findTruthyPropertyValue(kind0, ['lud16', 'lightning', 'lnurl', 'lnurlp', 'lnurlw']);
if (lud16) {
fields.lud16 = lud16;
}
const nip05 = findTruthyPropertyValue(kind0, ['nip05']);
if (nip05) {
fields.nip05 = nip05;
}
return fields;
};
View quoted note →
GitHub
plebdevs/src/utils/nostr.js at d8bba02a2f6c02b4661007b4847a9472498d6f2d · AustinKelsay/plebdevs
Developer education, content, and community platform built on Nostr and fully Lightning integrated. - AustinKelsay/plebdevs
My favorite clients were the ones that had two fields for both LUD-06 and LUD-16 addresses.
Good thing there aren’t any that do that anymore!
Oh, wait… 😆 

Yeah, lol. And it's not even a NIP. We had to do it just because others had it too
I think it’s safe to remove a few of those vestigial fields now.
You can use #Shakespeare to let it write a proper NIP for that, then post that to nostrhub.io - I did this with my NIP-54 successor. Or you write the NIP fully yourself as you have done multiple times.
lol sound advice
Community curation via NostrHub.io will prove itself to be a much more agile and responsive method to reflect changes like this one.
I would rename it while there’s still time.
Slightly unrelated:
Where can I rebroadcast the Kind0 event of another user? I sometimes can see the profile page in Amethyst, but it's missing from other clients, and I guess it's a relay issue