Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maticnetwork/metamask-provider
Metamask provider to run multiple networks without changing Metamask network
https://github.com/maticnetwork/metamask-provider
ethereum matic metamask web3
Last synced: 8 days ago
JSON representation
Metamask provider to run multiple networks without changing Metamask network
- Host: GitHub
- URL: https://github.com/maticnetwork/metamask-provider
- Owner: maticnetwork
- License: mit
- Created: 2019-12-18T10:28:29.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T00:59:11.000Z (almost 2 years ago)
- Last Synced: 2024-09-19T23:38:29.540Z (about 2 months ago)
- Topics: ethereum, matic, metamask, web3
- Language: JavaScript
- Size: 871 KB
- Stars: 16
- Watchers: 32
- Forks: 11
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# metamask-provider
Metamask provider to connect Matic Network. In future, plan is to use mm-plugin to handle multiple networks.
### Installation
```bash
$ npm install --save @maticnetwork/metamask-provider
```### Usage
Create network providers by instantiating provider objects.
```js
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/"
})// 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