UNPKG

@waku/rln

Version:

RLN (Rate Limiting Nullifier) implementation for Waku

12 lines 533 B
import { ethers } from "ethers"; export const extractMetaMaskSigner = async () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any const ethereum = window.ethereum; if (!ethereum) { throw Error("Missing or invalid Ethereum provider. Please install a Web3 wallet such as MetaMask."); } await ethereum.request({ method: "eth_requestAccounts" }); const provider = new ethers.providers.Web3Provider(ethereum, "any"); return provider.getSigner(); }; //# sourceMappingURL=metamask.js.map