ethereum - Metamask eth 加密一次解密多条消息

标签 ethereum web3js metamask

我的应用程序正在使用 Metamask 使用 sigUtil.encrypt 来加密和解密用户消息/eth_decrypt

每当应用程序要求用户解密消息时,它都会向用户显示一个 Metamask 对话框,要求他们允许解密消息。

假设应用程序需要一次解密 200 条消息。用户将需要确认该对话框 200 次。有没有一种方法可以让应用程序仅通过一个对话框就要求用户解密所有消息?

如果没有,那么是否可以组合所有加密消息,然后要求 Metamask 解密该消息?

Example显示问题。加密多条消息,然后尝试解密所有消息。它将显示多个对话框。

最佳答案

Is there a way for the application to ask the user to decrypt all the messages with only one dialog?

没有。

If not, then is it possible to combine all the encrypted messages and then ask Metamask to decrypt that message?

我不相信这是可能的。加密消息应在加密前打包在一起。

关于ethereum - Metamask eth 加密一次解密多条消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66862869/

相关文章:

node.js - 如果我知道地址和私钥,如何在 web3 中导入以太坊帐户?

javascript - 使用 web3 在 MetaMask 中避免 "This gas fee has been suggested by"消息

Javascript 将以太坊 web3 json 对象转换为数组

node.js - 从node.js调用已部署的智能合约

ethereum - 功能高的气体需求 : infinite

flutter - 如何将web3中的合约与flutter连接起来

ethereum - 如何使用geth获取以太坊区 block 的数据

ethereum - 所需气体超出区 block 气体限制回退功能

error-handling - 没有在给定选项或默认选项中指定有效的 “from”地址