nips
nips copied to clipboard
nip-07 does not work for multiple accounts
The current API with extension by Alby and nos2x:
async window.nostr.getPublicKey(): string // returns your public key as hex
async window.nostr.signEvent(event): Event // returns the full event object signed
async window.nostr.getRelays(): { [url: string]: RelayPolicy } // returns a map of relays
async window.nostr.nip04.encrypt(pubkey, plaintext): string // returns ciphertext+iv as specified in nip04
async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext+iv as specified in nip04
is not designed to manage multiple keys.
Should it be amended or would that be a new nip?
Perhaps there could be an extension that held multiple keys and prompted the user with which of the multiple keys they want to sign before actually signing, or lets them choose one for each domain in a popup, then be compatible with the same API.
I need multiple on the same domain. Many are in the same boat when running secondary accounts for their projects. I would have posted much more as Walletscrutiny already, had it been easy to switch accounts but so far, only Nostroid is supporting multiple accounts but it needs nip-07 next ;)
I still think this doesn't make sense as a standard since it would require client support and probably very few people are going to implement that. It is much better for everyone if there is one NIP-07 extension for power users like you that allows you to choose what key to sign with. That approach may come with its own set of challenges though, but this problem is not trivial anywhere.
So I'll make a different nip for that. Fine with me but I'll need it and I think you underestimate how many people want multiple accounts. Basically every company- or project account is controlled by somebody who also has at least one private account.
I want to understand why you think my suggestion is not good and how it doesn't solve the problem.
Oh! I misread you! So you suggest to amend nip-07?
I didn't mean to keep tools separate but the nip. So if nos2x has multi-account support it may advertise supporting nip-07 and nip-whatever and same for the clients that make use of it. Amending nips leads to confusion about feature sets but as we are early on and nips are drafts anyway, it might be preferred to just polish nips.
No!
I suggested to make an extension that is compatible with NIP-07 as it is now, but support multiple accounts in it!
Closed due to inactivity