lightning-browser-extension
lightning-browser-extension copied to clipboard
feat: tipping support for mastodon
Link this PR to an issue
Fixes #476
Type of change (Remove other not matching type)
- New feature (non-breaking change which adds functionality)
Describe the changes you have made in this PR -
Tipping support for Mastodon instances.
- bitcoinhackers.org
- kosmos.social
How Has This Been Tested?
✅ Tipped on bitcoinhackers.com
Checklist:
- [ ] My code follows the style guidelines of this project and performed a self-review of my own code
- [ ] New and existing tests pass locally with my changes
- [ ] I checked if I need to make corresponding changes to the documentation (and made those changes if needed)
@bumi I just added tipping support for Mastodon instances. There are a few questions left that I wanted to clarify before submitting the MR for review:
-
Mastodon instances I've added bitcoinhackers.org and kosmos.social that were mentioned in the original issue already, are there any other instances you'd want to support?
-
Where to search for Currently we only look for lightning addresses / LNURLP in the bio. In the original issue there was also this idea of supporting the original profile email. However I don't know how we want to know weather an email is a lightning address at this point? 🤔
re 1: we should add mastodon.social and let's ask on twitter?
re 2. we could also use custom profile metadata:
I'd say the bio and a custom lightning meta data profile entry?
re 1: we should add mastodon.social and let's ask on twitter?
Good idea, let's do a poll again!
re 2. we could also use custom profile metadata:
I'd say the bio and a custom lightning meta data profile entry?
Sure, let's include that as well. 👍
Here is a list of instances: https://joinmastodon.org/communities
maybe we can also make a PR to officially add it to Mastodon: https://github.com/mastodon/mastodon ?
edit: I don't think so, they seem to only have stupid text key-value pairs in the profile.
the twitter poll: https://twitter.com/getAlby/status/1520899495835635712
@reneaaron could you send me a screenshot of a profile on mastodon with a Lightning Address? I want to update the designs on getalby.com/value4value
maybe we can also make a PR to officially add it to Mastodon: https://github.com/mastodon/mastodon ?
I think that would generally be preferable, since there are so many instances that you can't really have a whitelist for it.
I was thinking about this in the past, and I think the cleanest way would be to add a new Mastodon user preference for adding a Lightning Address to a user profile, which could then be fetched by any other user and software (Mastodon is just one out of many ActivityPub applications). And the user's client could then implement the payment flow via the Lightning Address and using WebLN, and whatever integration is best for native mobile apps on the various mobile operating systems.
To improve things for users even further, fediverse server providers can then also go ahead and offer sats inboxes for their local users, and pre-configure local Lightning Addresses for them (same as the normal user address). This is what we had planned to do with kosmos.social, once we have the user base there ported to our LDAP server, where we already offer Lightning accounts to all kosmos.org users.
@bumi
re 2. we could also use custom profile metadata:
There's an existing convention for cryptocurrency donation addresses: metadata fields with labels like $BTC, $ETH etc. I've never seen anything like $LN though
There's an existing convention for cryptocurrency donation addresses: metadata fields with labels like $BTC, $ETH etc. I've never seen anything like $LN though @silverpill ahh, good to know. should we use $BTC? or $LN?
I don't know, which one do you think Alby users would prefer? It's just a convention and most fedi servers display such fields as ordinary fields. One exception is Soapbox which displays them as donation widgets. I think it will recognize both $BTC and $LN but it won't show an icon for $LN because it uses icons from cryptocurrency-icons package.