This package allows you to use any purser wallet as an ethers.js signer.
npm install ethers @purser/signer-ethers
import { getDefaultProvider } from "ethers";
import { create } from "@purser/metamask";
import { EthersSigner } from "@purser/signer-ethers";
const provider = getDefaultProvider("ropsten");
const initSigner = async () => {
const wallet = await create();
const signer = new EthersSigner({ purserWallet: wallet, provider });
};
You can then use the signer to connect to Ethereum contracts with ethers.
You can find more in-depth description for this module's API in the purser docs.
This package is part of the purser monorepo package.
Please read our Contributing Guidelines for how to get started.
The @purser/core
library along with the whole purser monorepo are MIT licensed.