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 requiring in-depth knowledge of blockchain systems. Matic.js supports two popular libraries:Documentation Index
Fetch the complete documentation index at: https://docs.polygon.technology/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Ensure that your Node.js version is up to date. We recommend using Node.js version v18.19.1 for optimal compatibility.Installation
Matic.js core library
The library contains core logic and provides different APIs. The user interacts mostly with this library.Matic.js ethers library
The ethers library allows us to use any ethers function. It is injected into Matic.js using plugins.Matic.js web3 library
The web3 library allows us to use any web3 function.Initializing
To code with matic, import the relevant libraries in your scripts. For example:- Click for more details on POS applications that use
web3js. - Click for more details on POS applications that use
ethers.