0

我正在尝试创建一个可以通过 WalletConnect 连接到移动钱包(例如:Metamask、TrustWalet...)的移动应用程序,但我找不到任何东西。

有什么方法可以在 Flutter 应用上实现 walletconnect 吗?

4

1 回答 1

0
dependencies:
  wallet_connect: ^1.0.2

  final wcClient = WCClient(
      onConnect: () {
        // Respond to connect callback
      },
      onDisconnect: (code, reason) {
        // Respond to disconnect callback
      },
      onFailure: (error) {
        // Respond to connection failure callback
      },
      onSessionRequest: (id, peerMeta) {
        // Respond to connection request callback
      },
      onEthSign: (id, message) {
        // Respond to personal_sign or eth_sign or eth_signTypedData request callback
      },
      onEthSendTransaction: (id, tx) {
        // Respond to eth_sendTransaction request callback
      },
      onEthSignTransaction: (id, tx) {
        // Respond to eth_signTransaction request callback
      },
    );

更多检查:链接

于 2021-12-29T05:31:09.023 回答