status:draft
since:v0.3.5
Goal
The goal is to make it easy for Nostr users to tip other Nostr users for specific notes
Definitions
Owner: the Nostr user from whom the bot accepts tip commands
Pairing: the process by which the Owner info (pubkey, relays) is configured in the bot
Architecture
The bot has an LN client and a Nostr client. The LN client has sufficient permissions to pay invoices.
The bot's Nostr client listens for the owner's NIP-254 reaction events. To do that, the bot starts with one or several "seed-relays" which it queries for possible NIP-65 Relay List Metadata5 events sent by the owner. If some are found, the bot will listen on those relays. If none are found, the bot will listen on the seed relays defined during pairing.
Each time the bot sees a positive reaction6 from its owner, it:
- looks up the author of the reacted-to note
- looks up the profile of that author
- looks up the
lud06
(LNURL) andlud16
(LN Address) fields in the profile - if any of them is present, it uses its LN client to send a tip
The LN tip can include a reference to the reacted-to note in its memo, such as "Tip for your note1abc...".
- ^ From any client that supports NIP-25 Reactions, such has likes
- ^ Using direct commands to an LN node
- ^ Without publishing Nostr notes with payment details
- ^ https://github.com/nostr-protocol/nips/blob/master/25.md
- ^ https://github.com/nostr-protocol/nips/blob/master/65.md
- ^
Any reaction where the content is a
+
or an emoji is considered a positive reaction. NIP-25 also supports negative reactions, where the content is-
. These are ignored by the bot.