如何使用web3.js断开元掩as钱包
我想使用web3或ether.js断开元掩as钱包 但是我找不到任何函数可以断开编程的连接。
I want to disconnect metamask wallet using web3 or ether.js
But I cannot find any function to disconnect programly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不能以编程方式进行操作,因为它取决于用户可以断开/连接,因此您无法通过MetAmask钱包来控制(从代码级别)。您只需通过检查是否可以访问用户的钱包帐户来模拟登录和登录的流程。
It can not be done programmatically, because it is up to the user to disconnect/connect, you have no control(from code level) over metamask wallet. You just simulate flow of logging in and logging out by checking if you can get access to user's wallet accounts.