如何连接对元掩体和其他钱包反应的铬延长?

发布于 2025-01-21 06:52:46 字数 507 浏览 4 评论 0原文

我需要将metAmask连接到我正在做的镀铬扩展。我不是加密专家,我正在使用Ethers JS,并遵循一些教程,但是扩展名并未认识到MetAmask在浏览器中。我在普通的Web应用程序(不是Chrome Extension)中运行相同的脚本,并且一切正常,并且可以与MetAmask及所有这些互动。我一直在试图理解为什么它不起作用,并且在这一点上我有点迷路了。

我一直在阅读Chrome开发人员文档,似乎有一种方法可以在两个扩展之间发送一些数据。但是我不知道如何将其介绍给我的项目,而且您可以共享的数据量似乎受到限制。

我已经在堆栈溢出中搜索,但我不了解这些问题的答案。或如何将它们应用于我的案件。

我发现了这个,但看起来只能与metamask一起使用,而与其他钱包无关:连接到MetAmask通过Chrome扩展

I need to connect Metamask to a Chrome extension I'm doing. I'm not a crypto expert, I'm using ethers js and following some tutorials but the extension doesn't recognize that Metamask is in the browser. I run the same scripts in a normal web app (not Chrome extension) and everything works perfectly and I can interact with Metamask and all of that. I've been trying to understand why it's not working and I'm kind of lost at this point.

I've been reading the Chrome Developers documentation and it seems like there's a way to send messages with some data between two extensions. But I can't figure out how to introduce that to my project, and also the amount of data you can share seems to be limited somehow.

I've searched in Stack Overflow but I don't understand the answers to those questions. Or how to apply them to my case.

I found this but it looks that only works with MetaMask and not with other wallets: Connect to MetaMask via chrome extension

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文