The end-points of the hmy blockchain
set up ChainID
and ChainType
, typically we can use the default values
set the chainID
set the chainType
hmy
or eth
Will change the provider for its module.
a valid provider, you can replace it with your own working node
Change the Shard ID
Set the sharding Structure
The array of information of sharding structures
Generated using TypeDoc
Create a harmony instance
// import or require Harmony class const { Harmony } = require('@harmony-js/core'); // import or require settings const { ChainID, ChainType } = require('@harmony-js/utils'); // Initialize the Harmony instance const hmy = new Harmony( // rpc url: // local: http://localhost:9500 // testnet: https://api.s0.b.hmny.io/ // mainnet: https://api.s0.t.hmny.io/ 'http://localhost:9500', { // chainType set to Harmony chainType: ChainType.Harmony, // chainType set to HmyLocal chainId: ChainID.HmyLocal, }, );