Damus
Leo Wandersleb profile picture
Leo Wandersleb
@LeoWandersleb
Where are all the bunker devs? I tried to use zapstore/zsp with Amber but it didn't work because zsp treats the secret of the bunker url as an api key while Amber treats it as a pairing code. And there is good arguments for both approaches.

pairing code: the bunker app pairs with a client and from then on uses a client key that is not exposed to the user to avoid re-use. This is a very tight link. If you want to use different clients you have to use different bunker urls and while that is hard to setup, it prevents a situation where you cannot know who is abusing the bunker as there is only one client per bunker url.

api key: knox uses the secret from the bunker url like an api key and allows ephemeral client keys. This is easier to setup as a bunker url can be re-used and it's more private as the client key is a nostr identity and re-use means privacy leaks.

So knox uses a long secret while Amber uses a short one and those differing approaches result in friction. And the nip allows both. I think there should be more clarity in the nip and as both approaches are somewhat valid, both should be supported. Maybe a pairing code should avoid the parameter "secret=..." and use "nonce=..." or something? Also privacy should be possible regardless of the client key being re-used or not, using giftwraps.

@Alex Gleason @greenart7c3 @nprofile1q... @Russell
hodlbod · 5w
I've always understood it as a pairing code, it gets pasted all over the place whereas the client key is secure
Russell · 5w
If it didn't work, it's because zsp is not fully compliant with NIP-46. The secret is not even required, it's up to the bunker to enforce it or not. As for me, there is no need to update the NIP.
greenart7c3 · 5w
The privacy aspect is in the bunker side in Knox, when I made amber it wasn't clear that I needed to create a new keypair for each bunker uri (I still need to change that). I think Knox also let's you reuse the secret a few times if I remember correctly The nip should be more clear on how clients a...
fiatjaf · 5w
I've once thought the "secret" was a secret and could be relied upon as an authorization token, but I realized that couldn't be it since most clients only called "connect" once with the secret, so it is de facto a nonce, the NIP should make this explicit. Someone please send a PR editing it. On the...