@futureverse/wallet-signer-etherjs
v1.0.1
Published
Futureverse Wallet signer for Ether.js
Downloads
12
Maintainers
Keywords
Readme
Futureverse Wallet Signer for Ether.js
This is a signer for Ether.js that can be used with any provider.
Installation
NPM:
npm install @futureverse/wallet-signer-etherjs --save
Yarn:
yarn add @futureverse/wallet-signer-etherjs
Usage
import { getDefaultProvider } from "ethers"
import { FutureverseWalletSigner } from '@futureverse/wallet-signer'
const provider = getDefaultProvider()
const signer= new FutureverseSigner(provider)
Changing provider
You can change the provider at any time by calling connect
on the signer.
const signer= new FutureverseSigner(oldProvider)
signer.connect(newProvider)
Auto connect
Enable auto connection on whitelisted domains
const signer= new FutureverseSigner(provider, true)
Futureverse Wallet
By default, this signer will use the Futureverse Wallet, however you change this by initiliasing the FutureverseWalletSigner with a different URL:
const signer= new FutureverseSigner(provider, false, 'https://wallet.your-implementation.com')
Requirements
- A provider is always required by default