JS doesn't care if the method would accept more parameters so it should be backwards compatible or in other words, that extra parameter may be undefined in which case it would behave as before.

On the other hand as the client would need to be changed to take advantage of this, a new method could be introduced. It would just clutter the API if you had both `encrypt()` and `encryptWith()`.

Reply to this note

Please Login to reply.

Discussion

Another alternative would be to let the plugin change the account, not the client. Since in Nostr is the plugin that really manages it.

A new API function could be define that allows the client to notify the website that the account changed so the website acts accordingly.

I'm still not decided on which is the best approach.