Socket
Book a DemoInstallSign in
Socket

@maticnetwork/metamask-provider

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@maticnetwork/metamask-provider

Metamask provider to connect with Matic Network

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
2
Created
Source

metamask-provider

Metamask provider to connect Matic Network. In future, plan is to use mm-plugin to handle multiple networks.

Installation

$ npm install --save @maticnetwork/metamask-provider

Usage

Create network providers by instantiating provider objects.

import MetamaskProvider from "@maticnetwork/metamask-provider"

// enable ethereum metamask
window.ethereum.enable()

// create ropsten provider
const ropstenProvider = new MetamaskProvider(window.ethereum, {
  url: "https://ropsten.infura.io/v3/<your-infura-api-key>"
})

// create matic testnet provider
const maticTestnetProvider = new MetamaskProvider(window.ethereum, {
  url: "https://testnet.matic.network"
})

Use these providers to create Web3 objects to use web3 apis.

License

MIT

Keywords

metamask

FAQs

Package last updated on 21 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts