pull down to refresh
0 sats \ 0 replies \ @ek 14 Mar freebie \ on: Data Vending Machine implementation nostr
Yes, I think so.
I haven't looked much into NIP-89 and NIP-90 but that's at least how NWC works: for every payment request, you broadcast an encrypted event with the bolt11 payment request inside and the wallet listens for such events (kind 23194). When the wallet sees such an event, it pays it (or not) and then broadcasts another event with success or error. The client also listens for such responses (kind 23195). That's how the client and wallet communicate: by broadcasting events.
Ideally, the relay (that is defined by the wallet in the NWC connection string) would require authentication but the events are encrypted (even though NWC uses NIP-04 and not NIP-44 which was merged after NWC) so the spec only recommends authentication but it's not mandatory.
You can look at the SN code if you want an example for a NWC client here.