-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIP-46: Missing Details on Metadata Usage in Client-Initiated Connection #1596
Comments
@fiatjaf can you help us clarify this? Or do you know, who can? |
Usually clients prefer using name=example&perms=nip04_encryption instead of the json metadata to make the qrcode smaller |
That's helpful! Can we define that in NIP-46? It should be clear what sorts of values are expected for |
Metadata is used by signer to show to the user some info about the client that is trying to connect, i.e. "nostrudel.ninja icon is requesting connection, and requesting these perms". All fields are optional, I would say web apps SHOULD provide url and icon, native apps - name and icon.
The original spec (or at least every version I looked at) mentions metadata as json. I saw that nostrudel (the only one that supported nostrconnect a while ago) passes it as query-string, so I implemented both ways in nsec.app. nostr-login uses json. I'm fine with switching to query string.
I don't use description, and I don't think it's useful. The rest are useful and pretty obvious, perms is defined. Maybe something like "Client's metadata is presented by signer to the user to improve UX" might be added to the NIP. |
Yeah, this is annoyingly under-specified. I had to look at nostr-login's source to get something to work. It doesn't follow the spec, but instead puts all the params directly into the uri, which is much more sane than json encoding everything. I checked with @greenart7c3 and he said he'd be fine to support that. (I know both guys have already chimed in, just explaining how I got to where I am) So Coracle does this:
@nostrband is referring to |
The specification for the client-provided connection string fails to explain the
metadata
parameter.Currently, the NIP states the following:
The
metadata
query param in the client connection string is mentioned once, here, then never fully explained. The only detail given is in the section on permissions in theconnect
request, where it states:The expected usage of the
name
,url
, anddescription
fields is never given.Is there anyone who has implemented this client-initiated connection handshake and can explain how the
metadata
parameter is used?If there is no expected usage, I propose we replace the
metadata
param in the client connection string with just an optionalperms
parameter.The text was updated successfully, but these errors were encountered: