Skip to content

Rebrand hf24

Mahdi Yari requested to merge rebrand-hf24 into master

Close #9 (closed)

Summary:

Added rebrandedApi option to the client options with default false.

Just add the configuration to the class constructor and it's ready for eclipse rpc nodes.

const client = new dhive.Client("https://rpc", { rebrandedApi: true })

OR

Added a method to get the rpc node version after constracting the client client.database.getVersion() And a method to update operations before broadcasting transactions client.updateOperations(boolean)

e.g. usage:

const client = new dhive.Client("https://rpc")
client.database.getVersion().then((res) => {
  if (res.blockchain_version !== '0.23.0') {
    // true: eclipse rebranded rpc nodes
    // false: default old nodes (not necessary to call for old nodes)
    client.updateOperations(true)
  }
})
Edited by Mahdi Yari

Merge request reports

Loading