Ah, I get it. Are you trying to implement Amber with your client? If so, that would be very cool.
Discussion
no i was just trying to use coracle on my mobile after an upgrade, which now disabled the previously saved nsec, and it wouldn't accept my nsec from scanning it from a QR code, the text looked right in the input box but it said it was invalid
Ah, okay. Also, that would be very cool. 😁
Would it even be possible to use Amber over the API? Or do I just sound confused?
amber is just a signer, it doesn't dispatch the events to the relay afaik
Yeah, I meant, if it would be possible to use it to sign. Instead of a browser extension or something on the command line.
i didn't know amber had a pc based version, i thought it was only for mobile
but yes, i'd say so, that's all it does, it has a list of rules about what it automatically signs and what it prompts and what it rejects and you just fling unsigned events at it and it signs them and returns them
Yes, apparently. I also thought it only worked on mobile because everything else gave me an error, but that was apparently Orbot interfering.
Amber is always on Android, but the PC client can generate a link, display it with a QR code, and then you just take a pic of that with your phone and open that in Amber, and it signs. Pretty cool.
is it a bunker?
i assume once you do it one time it keeps on working, i'm guessing that the QR code has the bunker address thingy
Yes, the code is just bunker://
So, your API could just show a QR code. Just checked. Yes, you could have a QR endpoint. Cool.
you mean where it provides a bunker address to a caller?
i don't really know how bunkers work exactly, just the vague idea they involve ephemeral events and the relay acts as a middleman to pass the message between the signer and the client
what i mean is, i'm pretty sure it is just a regular event so it goes through the /event endpoint that publishes events
the /relay endpoint could be used instead for this, but the ephemeral kind designation has the same effect (i just want to have an explicit call for relaying for future work, like the IRC like protocol i have in mind)