open-index/open-npm huggingface dataset:
npm package: @maticnetwork/maticjs-plasma
Description: Plasma bridge plugin for maticjs. It provides PlasmaClient to interact with plasma bridge.
Latest version: 1.1.0

[![TEST](https://github.com/maticnetwork/maticjs-plasma/actions/workflows/test.yml/badge.svg)](https://github.com/maticnetwork/maticjs-plasma/actions/workflows/test.yml) [![npm version](https://badge.fury.io/js/@maticnetwork%2Fmaticjs-plasma.svg)](https://badge.fury.io/js/@maticnetwork%2Fmaticjs-plasma)

# maticjs-plasma
Plasma bridge plugin for maticjs. It provides PlasmaClient to interact with plasma bridge.

# Installation

```
npm i @maticnetwork/maticjs-plasma
```

# Examples

All the examples are in examples folder of this repo.

# Docs

https://maticnetwork.github.io/matic.js/docs/plasma/
npm package: @maticnetwork/maticjs-web3
Description: web3.js plugin for matic.js
Latest version: 1.0.5

[![npm version](https://badge.fury.io/js/@maticnetwork%2Fmaticjs-web3.svg)](https://badge.fury.io/js/@maticnetwork%2Fmaticjs-web3)
# maticjs-web3

[web3.js](https://web3js.readthedocs.io/) plugin for matic.js

# Installation

```
npm i @maticnetwork/maticjs-web3
```

# Examples

All the examples are in the examples folder.

# Docs

```

import { use } from '@maticnetwork/maticjs'
import { Web3ClientPlugin } from '@maticnetwork/maticjs-web3'

// install ethers plugin
use(Web3ClientPlugin)
```

That's all you need to do and `web3.js` will be used for web3 calls.
npm package: @maticnetwork/meta
Description: Matic network contracts' addresses and ABIs
Latest version: 2.4.59

# Static server
The private static server for Matic.

### How it works?
All files, in this repository, will be served over AWS S3 at `https://static.matic.network/<file-path>`.

### Production
Master branch will be automatically deployed. No other action required.

## Package Usage

### Installation
```bash
$ npm i --save @maticnetwork/meta
```
### Usage
```javascript
const Network = require("@maticnetwork/meta/network")

// define network
const network = new Network("testnet", "mumbai")

const Matic = network.Matic  // all info related to Matic
const Main = network.Main // all info related to Main
const Heimdall = network.Heimdall // all info related to Heimdall

const RootChainABI = network.abi("RootChain")

// use matic js
let matic = new Matic ({
    maticProvider: Matic.RPC,
    mainProvider: Main.RPC,
    registry: Main.Contracts.Registry,
    ...
    ...
})
```


### Before Publishing
```
npm run minify
```
npm package: @maticnetwork/metamask-provider
Description: Metamask provider to connect with Matic Network
Author: Matic Network
Latest version: 0.0.1

# 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/<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
npm package: @maticnetwork/polygonmesh
Description: A CSS library by Polygon Technology
Latest version: 1.0.1

# polygonmesh

👋 PolygonMesh will help you build beautiful websites in no time. It is an open-source design system crafted meticulously by the designers and developer at Polygon Technology.

# DOCS

https://maticnetwork.github.io/polygonmesh/
npm package: @maticnetwork/pos-portal
Description: Contracts to facilitate transfer of assets between Ethereum Main Network and Matic Network, using security of Matic POS layer
Latest version: 1.5.2

# Matic PoS (Proof-of-Stake) portal contracts

![Build Status](https://github.com/maticnetwork/pos-portal/workflows/CI/badge.svg)

Smart contracts that powers the PoS (proof-of-stake) based bridge mechanism for [Matic Network](https://matic.network). 

Audit - [Matic Audit CertiK Report.pdf](https://github.com/maticnetwork/pos-portal/files/5404262/Matic.Audit.CertiK.Report.pdf)

### Usage

Install package from **NPM** using

```bash
npm i @maticnetwork/pos-portal
```

### Setup

```bash
git clone https://github.com/maticnetwork/pos-portal
cd pos-portal

npm install
```

### Compile all contracts

```bash
npm run template:process
npm run build
```

### Start main chain and child chain

Start Main chain

```bash
npm run testrpc
```

Start Matic child chain (Requires docker)

```bash
npm run bor
```

If you ran a bor instance before, a dead docker container might still be lying around, clean it using following command:

```bash
npm run bor:clean
```

### Run testcases

```bash
npm run test
```

### Deploy contracts locally

```bash
npm run migrate
```


### Deploy contracts on mainnet
1. Moonwalker needs rabbitmq and local geth running
```bash
docker run -d -p 5672:5672 -p 15672:15672 rabbitmq:3-management
npm run testrpc
```

2. Export env vars
```bash
export MNEMONIC=
export FROM=
export PROVIDER_URL=
export ROOT_CHAIN_ID=
export CHILD_CHAIN_ID=
export PLASMA_ROOT_CHAIN=
export GAS_PRICE=
```

3. Compile contracts
```bash
npm run template:process -- --root-chain-id $ROOT_CHAIN_ID --child-chain-id $CHILD_CHAIN_ID
npm run build
```

4. Add root chain contract deployments to queue
```bash
npm run truffle exec moonwalker-migrations/queue-root-deployment.js
```

5. Process queue (rerun if interrupted)
```bash
node moonwalker-migrations/process-queue.js
```

6. Extract contract addresses from moonwalker output
```bash
node moonwalker-migrations/extract-addresses.js
```

7. Deploy child chain contracts
```bash
npm run truffle -- migrate --network mainnetChild --f 3 --to 3
```

8. Add root chain initializations to queue
```bash
node moonwalker-migrations/queue-root-initializations.js
```

9. Process queue (rerun if interrupted)
```bash
node moonwalker-migrations/process-queue.js
```

10. Initialize child chain contracts
```bash
npm run truffle -- migrate --network mainnetChild --f 5 --to 5
```

11. Register State Sync
- Register RootChainManager and ChildChainManager on StateSender
- Set stateSenderAddress on RootChainManager
- Grant STATE_SYNCER_ROLE on ChildChainManager

### Command scripts (Management scripts)

```bash
npm run truffle exec scripts/update-implementation.js -- --network <network-name> <new-address>
```

### Transfer proxy ownership and admin role
Set list of contract addresses and new owner address in `6_change_owners.js` migration script  
Set `MNEMONIC` and `API_KEY` as env variables
```bash
npm run change-owners -- --network <network-name>
```
npm package: @maticnetwork/react-native-ether
Description: Wallet utils module for react native
Author: maticnetwork
Latest version: 1.1.2


# react-native-ether

## Getting started

`$ npm install @maticnetwork/react-native-ether --save`

### Mostly automatic installation

`$ react-native link @maticnetwork/react-native-ether`

### Manual installation


#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `@maticnetwork/react-native-ether` and add `RNEther.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNEther.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android

1. Open up `android/app/src/main/java/[...]/MainActivity.java`
  - Add `import com.reactlibrary.RNEtherPackage;` to the imports at the top of the file
  - Add `new RNEtherPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
  	```
  	include ':react-native-ether'
  	project(':react-native-ether').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-ether/android')
  	```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
  	```
      compile project(':react-native-ether')
  	```


## Usage
```javascript
import RNEther from '@maticnetwork/react-native-ether';

RNEther.generatePKfromMnemonic(mnemonic, index)
	.then(privateKey => {})
	.catch((errorString, error) => {})
```
npm package: @maticnetwork/walletconnect-provider
Description: Walletconnect provider to connect with Matic Network
Author: Matic Network
Latest version: 0.0.1-beta.1

# walletconnect-provider

WalletConnect provider to connect Matic Network

### Installation

```bash
$ npm install --save @maticnetwork/walletconnect-provider
```

### Usage

Create network providers by instantiating provider objects.

```js
import WalletConnectProvider from "@maticnetwork/walletconnect-provider"

// ropsten provider
const ropstenProvider = new WalletConnectProvider({
  host: "https://ropsten.infura.io/v3/<your-infura-api-key>",
  callbacks: {
    onConnect: () => {
      // connected
    },
    onDisconnect: () => {}
  }
})

// createm matic testnet provider
const maticTestnetProvider = new WalletConnectProvider({
  host: "https://testnet2.matic.network",
  onConnect: () => {
    // connected
  },
  onDisconnect: () => {}
})
```

### License

MIT
npm package: @maticoapp/deck.gl-pmtiles
Description: This repo provides a typed Deck.gl layer and loader for PMTiles data. PMTiles data provides a serverless and compact way to store tile geospatial data. Combined with Deck.gl's rendering, this provides a flexible and powerful way to cheaply manage geospati
Author: Dylan Halpern
Latest version: 0.0.33

# @maticoapp/deck.gl-pmtiles

This repo provides a typed Deck.gl layer and loader for PMTiles data. PMTiles data provides a serverless and compact way to store tile geospatial data. Combined with Deck.gl's rendering, this provides a flexible and powerful way to cheaply manage geospatial data.

Learn more about Brandon Liu's [PMTiles and ProtoMaps work](https://github.com/protomaps/PMTiles).

## Breaking Changes
Version 0.0.3 breaks support for V2 tiles. Legacy support will be coming back soon. If you need to use legacy v2 spec PMtiles, use version 0.0.14 of this package.
## Roadmap
- Raster tile support
- V2 legacy support
## Repo Scripts:

```js
yarn build-dev 
// builds the loader/layer for development and listens for changes
    
    
yarn build-prod 
// builds the loader/layer for production
    
yarn dev 
// runs the development server for the loader/layer and the frontend example
```


## Example Usage:

```typescript
import React from 'react'
import { PMTLayer } from "@maticoapp/deck.gl-pmtiles";
import DeckGL from "@deck.gl/react/typed";

const INITIAL_VIEW_STATE = {
  longitude: -80,
  latitude: 37,
  zoom: 6,
  pitch: 0,
  bearing: 0,
};

const Example: React.FC = () => {
    const Layers = [
        new PMTLayer({
            id: "pmtiles-layer",
            data: "https://protomaps-static.sfo3.digitaloceanspaces.com/mantle-trial.pmtiles",
            getFillColor: [255, 120, 120],
            stroked: true,
            getLineColor: [8, 8, 8],
            lineWidthMinPixels: 1
        })
    ]

    return  <DeckGL
            controller={true}
            layers={layers}
            initialViewState={INITIAL_VIEW_STATE}
            />
}

export default Example

```

## Peer Dependencies

You must also install these packages in your app:

- deck.gl
- pmtiles

## Other Libraries and References


This repo's code builds on existing work adapted from:

- [Deckgl MVT Layer (MIT Licensed)](https://github.com/visgl/deck.gl/blob/master/modules/geo-layers/src/mvt-layer/mvt-layer.ts)
- [@jtmiclat/deck.gl-pmtiles (MIT Licensed)](https://github.com/jtmiclat/deck.gl-pmtiles) 
- [PMtiles Leaflet and Maplibre implementations (BSD-3 license)](https://github.com/protomaps/PMTiles/tree/master/js)