Skip to content

Instantly share code, notes, and snippets.

@fiatjaf
Last active September 30, 2023 05:48
Show Gist options
  • Save fiatjaf/ea7d21e81359e1eb8abcb8805306adaa to your computer and use it in GitHub Desktop.
Save fiatjaf/ea7d21e81359e1eb8abcb8805306adaa to your computer and use it in GitHub Desktop.
ActivityPub bridge Nostr relay bounty

ActivityPub bridge Nostr relay

tl;dr 5M sat bounty to make https://github.com/fiatjaf/no-fed work.

The idea

ActivityPub communication is between servers. A server talks to another server, pushing and pulling data. Identities live on servers. Nostr communication is between clients and servers.

The idea of https://github.com/fiatjaf/no-fed is to make a server that can act both as an ActivityPub server, and thus be the home of AP accounts, and as a Nostr relay, and thus serve events to those who ask for them.

From the ActivityPub side, it would work as a server that has accounts like npub1az6g0srekrm8c626umzvy4f2glec4haz2v7vtynt6tqs99p0mjmsna8xse@no-fed.com and works normally as that, fetching (and caching) stuff from the broader Nostr network when necessary to build the AP profile of Nostr accounts.

From the Nostr side it will be a relay from which posts from any ActivityPub account can be queried, and also a NIP05 provider for all these, so one can use their Nostr client to add lukedashjr_at_bitcoinhackers.org@no-fed.com and that will return a "virtual" public key generated deterministically from the target AP account id (which is an URL like https://bitcoinhackers.org/users/lukedashjr).

It shouldn't send data from AP to other Nostr relays because that would be unnecessarily spammy, Nostr clients that want to interact with AP accounts should learn how to follow this relay, and this could be an incentive for Nostr clients to build smarter flows around relay selection and usage.

It also should not actively query other Nostr relays in order to get updates that may interest external AP users. Instead, it should accept direct events submitted from Nostr clients and cache these if they are directly interesting to external AP followers of Nostr accounts or replies to external AP notes.

The implementation

All the pieces are in place in the https://github.com/fiatjaf/no-fed codebase, and it kinda works, at least from the AP side: it is possible for a Mastodon or Pleroma user to see the profile of a Nostr account given by <hex key>@nofedtestdomain.com. The Nostr side is untested and probably incomplete.

I've given up getting it working because I have no time and AP is very annoying to test with and I am probably missing some fundamentals, but it would be a waste to throw away this initiative and past work.

However, if you believe this project would better be done using some other language or framework or approach, please reach out and maybe we can adjust the bounty.

The bounty

The fiatjaf Nostr Fund is pledging 5 million satoshis to whoever can complete this task. See comments below to check if this bounty is still up for grabs or has been reserved to someone who may be working on it. The bounty can be adjusted upwards if this proves to be very time-consuming or harder work than initially thought.

@alexgleason
Copy link

Good evening, a bridge between ActivityPub and Nostr just dropped: https://soapbox.pub/blog/mostr-fediverse-nostr-bridge/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment