https://gist.github.com/melvincarvalho/0eeba92ad49bd7f8907694751ec20cbd
Discussion
Thanks. This looks useful!
Thanks! It's similar to what GPG does, but I think it can work even better on nostr.
Yep, I can implement this immediately for #nostr #safebox.
Love to hear it! Does it help with any use cases?
I think so. Each #safebox has its own nsec. It stores an owner npub, which is supposed to be the npub of the owner. This proposal might be useful for safeboxes that need to be publicly known, for example that they are operated on behalf of an owner (medical clinic) to issue medical records, credentials, etc. This would enable anyone to see that the wallet is properly delegated, anyone who needs to see that the medical record is properly signed and authorized.
My only suggestion is to make subkeys a tag instead of being specified in the kind 0 content, e.g.
[“subkeys”,
Noted! It may come to pass. But we learnt the hard way in Linked Data that n-adic tags become hard to work with. Years of trial and error tells me a simple array in the profile will work well. But, I could be wrong. We'll know more after implementing it. Let's see...
I am fine either way.
Interesting- tags versus structured json in the .content field. My hunch is that tags are better for relays that wish to index on the tags, so that might be better if a relay wants to make it easy to retrieve and index the delegated keys. I don’t think it makes much of a difference from a client perspective, but I envision, like followers/following, subkeys could range into the thousands.