The @matic.js
client library makes it easy for developers, who may not be deeply familiar with smart contract development, to interact with the various components of Matic Network.
Install the maticjs package via npm:
$ npm install --save @maticnetwork/maticjs
A bridge is basically a set of contracts that help in moving assets from the root chain to the child chain and vice versa.
There are primarily two bridges to move assets between Ethereum and Matic.
You can read more about Bridge here
Matic.js provides you respective client to use these bridges
const MaticPlasmaClient = require('@maticnetwork/maticjs')
Now using MaticPlasmaClient
we can do transaction on plasma bridge. The client contains different apis to help you with the transaction.
These API are covered in Plasma API.
const { MaticPoSClient } = require('@maticnetwork/maticjs')
Now using MaticPoSClient
we can do transaction on POS bridge. The client contains different apis to help you with the transaction.
These API are covered in POS API.