|
1 | | -# Installation |
| 1 | +[Matic.js](https://github.com/maticnetwork/matic.js) a JavaScript library that facilitates interaction with the Polygon network. It provides developers with simplified operations such as depositing, transferring, and withdrawing assets; allowing them to focus on building dApps without the need for in-depth knowledge of blockchain systems. |
2 | 2 |
|
3 | | -## Matic.JS |
| 3 | +Matic.js supports two popular libraries: |
4 | 4 |
|
5 | | -[Matic.js](https://github.com/maticnetwork/matic.js) a JavaScript library that facilitates interaction with the Polygon network. It provides developers with simplified operations such as depositing, transferring, and withdrawing assets; allowing developers to focus on building (dApps) without the need for in-depth knowledge of blockchain systems. |
| 5 | +1. [Web3.js](https://web3js.readthedocs.io/) |
| 6 | +2. [Ethers](https://docs.ethers.io/) |
| 7 | + |
| 8 | +## Prerequisites |
| 9 | + |
| 10 | +Ensure that your [Node.js](https://nodejs.org/en/)version is up to date. |
6 | 11 |
|
7 | | -Matic.js is made up of a main library and an Ethereum library: |
| 12 | +We recommend using Node.js version v18.19.1 for optimal compatibility. |
8 | 13 |
|
9 | | -## Main library |
| 14 | +## Matic.js core library |
10 | 15 |
|
11 | | -The main library has the core logic and provides different APIs. The user interacts mostly with this library. |
| 16 | +The library contains core logic and provides different APIs. The user interacts mostly with this library. |
12 | 17 |
|
13 | 18 | ```sh |
14 | 19 | npm i @maticnetwork/maticjs |
15 | 20 | ``` |
16 | | -## Ethereum library |
17 | 21 |
|
18 | | -The Ethereum library allows us to use any ether library. It is injected into Matic.js using plugins. |
19 | | - |
20 | | -matic.js supports two popular library - |
21 | | - |
22 | | -1. [Web3.js](https://web3js.readthedocs.io/) |
23 | | -2. [Ethers](https://docs.ethers.io/) |
| 22 | +## Matic.js ethers library |
24 | 23 |
|
25 | | -### Web3.js |
| 24 | +The ethers library allows us to use any ethers function. It is injected into Matic.js using plugins. |
26 | 25 |
|
27 | 26 | ```sh |
28 | | -npm install @maticnetwork/maticjs-web3 |
| 27 | +npm install @maticnetwork/maticjs-ethers |
29 | 28 | ``` |
30 | 29 |
|
31 | | -### ethers |
| 30 | +### Matic.js web3 library |
| 31 | + |
| 32 | +The web3 library allows us to use any web3 function. |
32 | 33 |
|
33 | 34 | ```sh |
34 | | -npm install @maticnetwork/maticjs-ethers |
| 35 | +npm install @maticnetwork/maticjs-web3 |
35 | 36 | ``` |
36 | | -### System requirements |
37 | | - |
38 | | -Ensure that your [Node.js](https://nodejs.org/en/)version is up to date. We recommend using Node.js version v18.19.1 for optimal compatibility. |
0 commit comments