The Chain3 class is a wrapper to house all MOAC related modules.
provider
-string|object
: A URL or one of the Chain3 provider classes.net
-net.Socket
(optional): The net NodeJS package.options
-object
(optional) The Chain3options <chain3-module-options>
import Chain3 from 'chain3';
// "Chain3.givenProvider" will be set in a MOAC supported browser.
const chain3 = new Chain3(Chain3.givenProvider || 'ws://some.local-or-remote.node:8546', net, options);
> chain3.mc
> chain3.utils
> chain3.version
This Static property will return an object with the classes of all major sub modules, to be able to instantiate them manually.
Object
: A list of modules:Mc
-Function
: the Mc module for interacting with the MOAC network seechain3.mc <mc>
for more.Net
-Function
: the Net module for interacting with network properties seechain3.mc.net <mc-net>
for more.Personal
-Function
: the Personal module for interacting with the Ethereum accounts seechain3.mc.personal <mc-personal>
for more.
Chain3.modules
> {
Mc(provider, net?, options?),
Net(provider, net?, options?),
Personal(provider, net?, options?),
}
Property of the Chain3 class.
chain3.version
Contains the version of the chain3
wrapper class.
String
: The current version.
chain3.version;
> "1.0.0"