@PABLOF7z @brugeman I've been working on adding NIP-46 to noStrudel and while I've mostly got it working I've got a few questions about nsecBunker and login.nostrapps.org @PABLOF7z The token that nsecBunker provides has a npub of the account and a hex token after the # <npub>#<token> How is this token supposed to be used? is it supposed to be the secret key that the app uses to talk to nsecBunker? There also seems to be bug where the first request made by the app asks the user for permission. but then never responds to the app and the app has to make the same request again @brugeman why dose the nip04_decrypt method return a JSON stringified array with the plaintext inside (ie. '["testing"]') instead of just the plaintext? Dose either nsecBunker or login.nostrapps.org implement the "describe" or "get_relays" methods? Sorry for all the questions, but I'm excited to get this working and I figured it would be better to ask here instead of opening issues on GitHub
The secret is a one-time use to apply a set of policies to the pubkey the user is using. So a user might choose to use their key A with nostrudel through nsecBunker, then nostrudel generates a key B.. Key B needs to be authorized to do things by Key A. NsecBunker can just ask the user for permissions, or the user can create a “policy”, assign a single-use secret and provide that secret to nostrudel. Just send it as the second (iirc) parameter on the connect call. More info on the unmerged nip-46 PR on the nips repo about this token
nip46 spec says that nip04_decrypt returns [plaintext], and that's what ndk's nip46 backend does, not sure what the reasoning is. It's been there from the start, might have been a typo. I will add describe soon and get_relays later. Also, wdyt of a new get_nip04_key method to let apps request a nip04 shared key to avoid RPC when decrypting lots of DMs? https://github.com/vitorpamplona/amethyst/issues/592#issuecomment-1840775927
Added describe to login.nostrapps.org
`describe` is getting axed on the rewrite of NIP-46 any reason why you want it @hzrd149 ?
@PABLOF7z and wdyt of get_nip04_key method to let apps request a nip04 shared key to avoid RPC when decrypting lots of DMs? Context: https://github.com/vitorpamplona/amethyst/issues/592#issuecomment-1840775927