问题标签 [wallet-connect]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
58 浏览

node.js - 使用 walletconnect nodejs 客户端如何设置自定义令牌传输?

  • 以上代码默认转账币种为BNB。如果我想通过合约地址设置转账其他BEP20币种怎么办?

钱包连接文档

0 投票
1 回答
147 浏览

react-native - 使用带有 ether.js 的 reactnnative walletconnect

这是一个粗略的总结,因为这些东西存在于不同的视图中。

我有一个使用钱包连接的反应原生应用程序。这允许我连接到手机上的元掩码钱包并创建一个连接器实例。

在我的应用程序的其他地方,我正在使用 ethers 来部署..

我想我不完全理解我如何使用我的钱包(连接器实例)来签署这些交易。钱包连接器实例似乎不包含“签名者”,它只是有一个让您签署交易的方法?我完全被这件事难住了。

这是输出

在此处输入图像描述

0 投票
0 回答
56 浏览

reactjs - WalletConnect 无法与 vite 捆绑

我有一个使用@walletconnect/client 的 vite 项目,一切正常

但是在构建(npm run build)期间我得到了这些错误

我尝试了一些来自 github 的 vite 配置

1.

  1. optimizeDeps:{排除:['@walletconnect/*']},

3

我不知道其他任何事情,但是如果您遇到此问题或类似问题。请让我知道你是如何解决你的

谢谢你。

0 投票
1 回答
54 浏览

javascript - 将交易发送到智能合约 (myContract.methods.myMethod.send() ) 返回错误:移动钱包上的未知帐户

Dapp 在用户执行特定活动(例如接受 BNB 发送到 ICO)后,将 Bep20 令牌从远程钱包(我的钱包)发送给用户,它在安装了 metamask 的桌面上运行良好。执行此操作的代码是:

在使用wallet connect作为提供者与web3modal连接的trust和metamask mobile等移动钱包上,我成功与钱包交互,提示用户发送BNB但

用于更改智能合约的状态以在将远程钱包添加到本地后发送用户 Bep20 令牌失败并出现未知帐户错误,使用:

注意:如果我尝试跳过

并使用 contractCall.encodeABI() 作为数据参数,它工作正常,但实际上没有令牌发送给用户,我猜是因为智能联系人状态需要更改/更改

请我需要任何有用的帮助/提示来使这项工作在移动钱包上工作,我已经在这个错误上待了几天了,谢谢

0 投票
0 回答
115 浏览

web3 - 使用 web3js 在 sendTransaction 上将 ETH 更改为 Binance Chain 网络

当网站页面下载时我有自动连接 MetamaskWallet,我需要在页面下载时自动更改从以太坊主网到币安链以在 eth.sendTransaction 中获取 BNB 中的甜甜圈我有错误代码:-32602,消息:'无效参数:必须提供以太坊地址使用 eth 它可以使用 eth gas 自动下载甜甜圈,我可以自动更改首选的主网 BNB

在此处输入图像描述

当用户将在现场显示带有 Binance 链的钱包 Metamask 并使用 BNB 最小气体而不像 eth 网络发送 eth.sendTransaction 时,我如何为所有用户更改主网 web3js 并在 BNB 中获得甜甜圈?也许有些人有工作示例,我将不胜感激=)

0 投票
0 回答
20 浏览

cryptography - 将加密钱包应用程序与第三方应用程序连接起来

当前是否有任何方法可以将 Metamask 等加密钱包(Android 应用)与另一个加密应用(Android)连接起来?如果我在基于加密的 Android dapp 上单击连接钱包(元掩码),则它必须自动打开元掩码应用程序并提示身份验证以连接钱包进行交易

0 投票
0 回答
154 浏览

react-native - Connecting to Metamask using React Native deeplink with WalletConnect

in the mobile app I'm creating, I want a wallet-login opensea-like system that allows connecting to Metamask by opening the latter through deeplinking and showing the want-to-connect popup.

To accomplish this, I am using WalletConnect and a customized version of the WalletConnectProvider for React Native, I read the docs about deeplinking to Wallets in order to have it work, and followed the issue in this thread to modify the received URI from the modal.

The fact is that despite I've written the next code to override the open modal for WalletConnect Object, metamask opens, but no login popup shows up at all

the below snippets is what I've done so far:

but if forAndroid is replaced by url in openURL function, a popup to choose a Wallet is shown as follows:

enter image description here

then selecting metemask and a pop up to login to the app is shown, but this is not the flow I want for my app.

I'll be thankful if someone could help me understand why memask is not processing properly the URI and doesn't allow authentication.

0 投票
0 回答
21 浏览

react-native - 如何从 scra 创建一个反应原生以太坊钱包

谁能帮我了解如何为以太坊创建钱包。尝试了解元掩码和彩虹,但它们的代码库非常庞大

我只是明白创建过程是从助记词到私钥再到公钥再到以太坊地址。但是你如何连接 eth 区块链

ethers 和 web3 有什么帮助?让我们进行深入的交谈

0 投票
0 回答
27 浏览

swift - 如何快速实现 eth_signTypedData?

我正在开发一个加密钱包,我已经实现了personal_sign,并且eth_sign很快,如何实现eth_signTypedData,官方的 walletConnect 文档似乎没有相关信息。有什么想法吗?谢谢!

0 投票
0 回答
32 浏览

reactjs - WalletConnect 问题导入“加密”

我正在使用钱包连接,但是当我尝试进行连接时,它给了我这个错误:

未找到模块:错误:无法解析“加密”

然后它给了我这些建议:

重大变化:webpack < 5 用于默认包含 node.js 核心模块的 polyfill。这已不再是这种情况。验证你是否需要这个模块并为它配置一个 polyfill。

如果你想包含一个 polyfill,你需要:

  • 添加一个后备 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
  • install 'crypto-browserify' 如果你不想包含 polyfill,你可以像这样使用一个空模块:resolve.fallback: { "crypto": false }

我试过但没有用,有人可以帮助我吗?连接的代码和网站解释的一样。(我正在使用反应)

这里更多:https ://docs.walletconnect.com/quick-start/dapps/node