🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@walletconnect/eth-provider

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@walletconnect/eth-provider

Web3 Provider for WalletConnect

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

WalletConnect ETH Provider

ETH Provider for WalletConnect

For more details, read the documentation

Example

import Web3 from "web3";
import WalletConnectProvider from "@walletconnect/eth-provider";

/**
 *  Create WalletConnect Provider (qrcode modal will be displayed automatically)
 */
const provider = new WalletConnectProvider({
  infuraId: "<INSERT_INFURA_APP_ID>",
});

/**
 *  Create Web3
 */
const web3 = new Web3(provider);

/**
 *  Get Accounts
 */
const accounts = await web3.eth.getAccounts();

/**
 * Send Transaction
 */
const txHash = await web3.eth.sendTransaction(tx);

/**
 * Sign Transaction
 */
const signedTx = await web3.eth.signTransaction(tx);

/**
 * Sign Message
 */
const signedMessage = await web3.eth.sign(msg);

/**
 * Sign Typed Data
 */
const signedTypedData = await web3.eth.signTypedData(msg);

Keywords

wallet

FAQs

Package last updated on 15 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts