Sync on Nostr: Saving this for later 😂 ...
Saving this for later 😂
quoting note1pa4…crn8Not my ln node, but my ln server. I’ve had to draw out the process many times to not forget how it works. Basically:
1.
Sender requests LUD16 from my ln server (https://westernbtc.com/.well-known/lnurlp/josh)
2.
Sender gets callback and requests (https://westernbtc.com/api/v1/payreq/josh?amount&nostr=%5Bnostr event])
3.
I check (ln server) if username is taken / associated with a white listed pubkey in my db.
Get wallet information from 10019 event.
Get mint quote request from top mint (maybe will try multiple later if top fails).
Send a queue message to a listener with the mint quote info.
Send bolt 11 invoice back for associated quote id
4.
Listener polls mint with quote id to see if it got paid or expired.
If it gets paid, call back to ln server (aka my api) at admin endpoint (https://westernbtc.com/api/v1/admin/mint-tokens). Don’t worry it has an api key.
5.
LN server (my api) then takes the fulfilled quote id, the receivers p2pk key, and mints the tokens.
Create the 9321 event with all the tokens and send to relays.
I’m sure all of this stuff is very familiar to you, so sorry if it was fluff 😂.