-
Notifications
You must be signed in to change notification settings - Fork 17
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
Adding NIP-07 compatibility #1
Comments
Yes, though to be clear there are (at least) two separate NIP-07 use cases possible: Use Case A: (as you describe above) Sign a NIP-26 delegation token with the main identity key safely kept within the extension. Use Case B: Load the delegatee PK into the extension and store its already-authorized delegation tag(s) in order to sign delegated events using the extension (in this scenario the main identity key would no longer be kept in the extension). Limiting ourselves to just Use Case A for now:
|
As I mentioned in the NIP-07 issue discussion, I'm less sure NIP-07 needs to support the Use Case A here. Certainly I could see a flow:
So basically a kind of imperfect way to bootstrap their way to keeping their main identity key more offline. Hmm. Gahh, I keep see-sawing! This does seem like the most likely scenario for people to migrate off their main identity PKs. |
Yeah I think saving a hot delegated key in each client sounds like they way to go. The user can then use the NIP-07 extension to sign the delegation, like the flow you describe above. Leveraging events and a dedicated identity manager client, as described in nostr-protocol/nips#247, also sounds like a great approach. I like the idea of using events to communicate between the relevant components, and it would help keep things more composable I suppose.
|
Looks like this is blocked because NIP-07 doesn't yet support signing events with delegation tags, and also doesn't support signing delegation tokens. In the meantime, I will fork nos2x and implement these two missing functions. |
I've got this all working locally (haven't tested the actual delegation tag yet), going to clean up some things and open some PRs ⚡ Screen.Recording.2023-02-17.at.9.15.46.AM.mov |
I'd like to take a stab at adding NIP-07 to this tool.
First, I'd like to plan out the work and make sure i've got a good understanding of what's needed. I'm still learning the nostr protocol, so please point out any mistakes or flaws that I may have made below!
The current flow for this tool is as follows (simplified and left some things out):
Sign delegation
which sends all above info to the/nip26/sign
route inapp.py
where it is signed and returned.Sign event w/delegatee
which sends the delegatee's private key and the delegation tag (and the rest of the event data) to the/event/sign
route where it is signed by the delegatee's private key.It looks like we would need to modify step 3 so that the the delegation token is generated/signed by the extension, which would enable the user to skip step 1 and leave their private key safely within the NIP-07 extension.
The text was updated successfully, but these errors were encountered: