Actually wait, the spec DOES say get_info is a query which you are supposed to respond to:
What gives?
ok it does both now -- if you query it, it responds the same as it did before now, but it also creates or replaces the replaceable "info" event on startup
@ek let me know if it works for you now
For those seeking the spec on how to do the replaceable info event, the spec is here:
Search for "The info event should be a replaceable event..."
reply
44 sats \ 4 replies \ @ek 18 Aug
Works now, thank you!
Maybe we should also support both (as a replaceable event and as a command) if docs.nwc.dev lists it only as a command.
reply
no problem :D
thank you for reporting the issue!
reply
10 sats \ 2 replies \ @ek 20 Aug
Oh, I just realized that get_info as a command is indeed part of the spec. It's the last command.
I didn't realize that. So it's indeed also part of the official spec!
reply
0 sats \ 1 reply \ @ek 20 Aug
We might exclusively use get_info then.
reply
it certainly makes the implementation simpler -- I didn't even realize there was supposed to be a get_info replaceable event because I don't think it's mentioned on nwc.dev
**EDIT: okay I found it, they do mention it: https://docs.nwc.dev/bitcoin-lightning-wallets/getting-started
reply
212 sats \ 2 replies \ @ek 18 Aug
Oh, mhh, the official spec ("official" as mentioned here) says this in Theory of Operation:
Theory of Operation
  1. Users who wish to use this NIP to send lightning payments to other nostr users must first acquire a special "connection" URI from their NIP-47 compliant wallet application. The wallet application may provide this URI using a QR screen, or a pasteable string, or some other means.
  2. The user should then copy this URI into their client(s) by pasting, or scanning the QR, etc. The client(s) should save this URI and use it later whenever the user makes a payment. The client should then request an info (13194) event from the relay(s) specified in the URI. The wallet service will have sent that event to those relays earlier, and the relays will hold it as a replaceable event.
Afaik, docs.nwc.dev is from @Alby. Let's see what they have to say about this 👀
reply
198 sats \ 1 reply \ @rolznz 19 Aug
We publish the 13194 event to announce what capabilities the wallet service supports, but this is done only once for the entire service.
The get_info command however is specific to the app connection, and can have a different list of commands based on the permissions granted to that app.
reply
100 sats \ 0 replies \ @ek 19 Aug
Ohh, interesting, so we should fetch the info event as a command to get the permissions for the current connection
reply