0.1.6 • Published 3 years ago

ethers-to-web3 v0.1.6

Weekly downloads
43
License
MIT
Repository
github
Last release
3 years ago

ethers-to-web3

Exports a function which takes an ethers.js Signer or Provider of any type, and gives you a Web3-compatible provider you can use with libraries which need it.

Usage

const { Wallet } = require('@ethersproject/wallet');
const { InfuraProvider } = require('@ethersproject/providers');
const signer = new Wallet(pvtKey).connect(new InfuraProvider('mainnet'));
const toWeb3Provider = require('ethers-to-web3');

const web3Provider = toWeb3Provider(signer); // now you can use this with Web3 or something that needs a Web3 provider

Author

Raymond Pulver IV