Rebrand hf24
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