rust-nostr/nostr

Call nip46 method `get_public_key` instead of getting user pubkey from the URI

Closed this issue · 2 comments

Describe the enhancement
Currently it looks like that signer_public_key will return whatever pubkey is in the bunker://... URI, but instead it should call the nip46 get_public_key method (and probably cache that result locally so it doesn't have to keep calling it).

Use case
The NIP was changed (or, as I would say, clarified) recently to make the distinction between user-pubkey and signer-pubkey: nostr-protocol/nips#1545, so new signer use cases are enabled.

Thanks, I'm fixing it. I noticed that in the connect method is specified that user-pubkey must be used, but it's not possible since the message is sent from client to signer and client not have the user-pubkey (yet). So I guess would be the remote-signer-pubkey?

https://github.com/nostr-protocol/nips/blob/f1e8d2c4f764d66996c0c1fb2eeabfbc0c7b2528/46.md?plain=1#L132

I don't know, I commented there on that PR's discussions that the first parameter of "connect" was always meaningless because either you don't know it or it is irrelevant, we should probably remove that from the NIP, since no signer is using it for anything. For now I guess you can just send the remote-signer-pubkey.