bridgy-fed icon indicating copy to clipboard operation
bridgy-fed copied to clipboard

Nostr: include native (source) id in NIP-39 tags in profile objects

Open snarfed opened this issue 7 months ago • 2 comments

NIP-39 specifies how to link to external identities, but only four: github, twitter, telegram, and mastodon. (Yes, mastodon specifically, not activitypub or fediverse.)

Still, it's the closest existing standard we have for linking a bridged Nostr account to its original native account, so I'm thinking we just overload it and use it anyway.

NIP-39 itself is not great, we'd have to figure out a few awkward bits. First, it says:

Identity provider names SHOULD only include a-z, 0-9 and the characters ._-/ and MUST NOT include :. Identity names SHOULD be normalized if possible by replacing uppercase letters with lowercase letters, and if there are multiple aliases for an entity the primary one should be used.

...and includes the example mastodon:bitcoinhackers.org/@semisol, where bitcoinhackers.org/@semisol is neither a WebFinger address nor an ActivityPub id URI. They evidently took the Mastodon-specific, user-facing profile URL and hacked off the https://. 😕 For non-Mastodon fediverse accounts, should we ignore that example and maybe use Webfinger? What do we do for Bluesky? Ideally we'd use the DID, but that includes colons. Do we escape those? Ugh.

Second, should we overload mastodon and use it for all fediverse accounts? Or add an activitypub or fediverse type? Neither seems ideal.

cc @rabble @melvincarvalho @alexgleason, any thoughts?

snarfed avatar May 31 '25 16:05 snarfed

https://github.com/nostr-protocol/nips/pull/1335 is an example attempt to add another provider to NIP-39, with discussion.

snarfed avatar May 31 '25 16:05 snarfed

NIP-39 is quite old, and I’m not sure how widely it’s used today, many people just add "github" in their profile. Worth checking the social graph again. Like many early NIPs, it solved an immediate need but wasn’t very extensible.

There’s been recurring discussion about extending profile fields (e.g. pronouns). Technically, profiles are just JSON, so extension is easy, but NIP-24 documents the shared fields, and any additions can get political: https://github.com/nostr-protocol/nips/blob/master/24.md

At the W3C Nostr CG, we’re exploring a more standards-based path. For example:

  • Linked Data schema for profiles: https://nostrcg.github.io/schema/

  • DID method: https://nostrcg.github.io/did-nostr/

Mostr is the most widely used bridge today, I'll check with @alexgleason what format they prefer: https://mostr.pub/

Another widely used method was nostr.directory by @pseudozach, which verified ActivityPub posts. That arguably saw more adoption than NIP-39.

One idea could be to use a field a profile field, which is what nip05 does, or generalize identity linking beyond the original four. But we should base this on what’s in use and what supports future interoperability.

melvincarvalho avatar May 31 '25 16:05 melvincarvalho

We ended up using NIP-48 proxy tags for this instead.

snarfed avatar Jun 28 '25 17:06 snarfed