Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

21paradox/metamask-provider-simulator

Repository files navigation

metamask-provider-simulator

A custom provider which implements all metamask inpage api.

You can use it for auto testing(puppeter), or develop a custom wallet client.

Usage:

import {
 initProvider
} from 'metamask-provider-simulator'
const myTestEnvFlag = tru
const myProvider = initProvider(
 rpcUrl, 
 chainid, 
 privateKey,
 () => {
 return myTestEnvFlag
 }
);
// then window.ethereum is available to use
// myProvider is window.ethereum

run example

fill .env file with your configs. rpcurl, chainid, privatekey

yarn serve

how to modify/develop this project

Project setup

yarn install

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build

Lints and fixes files

yarn lint

Customize configuration

See Configuration Reference.

About

A custom provider which implements all metamask inpage api. metamask simulator.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /