Plasma bridge functionality is available in separate repository. So in order to use plasma
bridge, you need to install separate package.
npm i @maticnetwork/maticjs-plasma
PlasmaClient
can be used to interact with Plasma Bridge.
import { PlasmaClient } from "@maticnetwork/maticjs-plasma"
const plasmaClient = new PlasmaClient();
await plasmaClient.init({
network: <network name>, // 'testnet' or 'mainnet'
version: <network version>, // 'mumbai' or 'v1'
parent: {
provider: <parent provider>,
defaultConfig: {
from: <from address>
}
},
child: {
provider: <child provider>,
defaultConfig: {
from: <from address>
}
}
});
Once plasmaClient
is initiated, you can interact with all available APIS.