
"and everything under the Sun is in tune
but the sun is eclipsed by the moon"
Eclipse - Pink Floyd
Changes in HF24/Eclipse RPC nodes:
Almost everything is rebranded in this version. You have to update anything that includes the word "steem" or "sbd" in your apps.
** ATTENTION **
All the listed changes will only take effect on the eclipse RPC nodes. It means you must not apply the updates in the production until there is a final release candidate.
Also, the old public nodes will continue running to give you enough time for updating your applications.
In the meantime, @gtg maintains an early version which you can test your apps with
https://beta.openhive.network/ (It is the mainnet)Affected operations:
comment_options(!)
Old:percent_steem_dollars
New:percent_hbdescrow_transfer
Old:steem_amount,sbd_amount
New:hive_amount,hbd_amountescrow_release
Old:steem_amount,sbd_amount
New:hive_amount,hbd_amountclaim_reward_balance
Old:reward_steem,reward_sbd
New:reward_hive,reward_hbdauthor_reward(virtual operation)
Old:steem_payout,sbd_payout
New:hive_payout,hbd_payoutwitness_update
Old:sbd_interest_rate
New:hbd_interest_ratewitness_set_properties
Old:sbd_interest_rate,sbd_exchange_rate
New:hbd_interest_rate,hbd_exchange_rate
Affected API calls:
Replace all the steem with hive and all the sbd with hbd in the received JSON object.
There is one exception in percent_steem_dollars which is now percent_hbd!
condenser_api.get_accounts(and other similar calls returning an account object likecondenser_api.lookup_account_names)condenser_api.get_blogcondenser_api.get_chain_propertiescondenser_api.get_contentcondenser_api.get_content_repliescondenser_api.get_discussions_by_*condenser_api.get_dynamic_global_propertiescondenser_api.get_market_historycondenser_api.get_tickercondenser_api.get_versioncondenser_api.get_volumecondenser_api.get_witness_by_accountcondenser_api.get_witness_schedulebridge.get_ranked_posts- All
database_apiequivelants of the methods above database_api.list_escrowsdatabase_api.find_sbd_conversion_requests(method renamed)database_api.list_sbd_conversion_requests(method renamed)database_api.find_witnessesmarket_history_api.get_market_historymarket_history_api.get_order_bookmarket_history_api.get_tickermarket_history_api.get_volumetags_api.get_discussiontags_api.get_discussions_by_*
Updated libraries:
Hive-js (see v0.8.2)
In order to connect to the eclipse RPC nodes, you have to set rebranded_api in the config.json to true.
Or
hive.config.set('rebranded_api', true)
hive.broadcast.updateOperations()
There is also a helper function to get the node version and update the config:
hive.utils.autoDetectApiVersion().then(() => {
hive.broadcast.updateOperations()
})
Note: Calling hive.broadcast.updateOperations() is necessary after updating the rebranded_api.
Dhive (see MR16 - v0.14.1)
In order to connect to the eclipse RPC nodes, the easy way is:
const client = new dhive.Client("https://rpc", { rebrandedApi: true })
Or
client.updateOperations(true) // true: hf24
And with the helper function:
const client = new dhive.Client("https://rpc")
client.database.getVersion().then((res) => {
if (res.blockchain_version !== '0.23.0') {
client.updateOperations(true)
}
})
Hive-tx (see v3.1.8)
hiveTx.config.rebranded_api = true
hiveTx.updateOperations()
OR
hiveTx.call('condenser_api.get_version').then(res => {
if (res.result.blockchain_version !== '0.23.0') {
hiveTx.config.rebranded_api = true
hiveTx.updateOperations()
}
})
Beem is also updated: https://github.com/holgern/beem/releases/tag/0.24.5
For the other libraries visit their repository for more information.
Note: the chain id is also changed in the HF24. But you don't have to worry about it since the libraries will take care of that.
If you have any question, join HiveDevs discord server https://discord [dot] gg/3WV87YE
Hive official discord: https://discord [dot] gg/kcCw73Z
Noob's guide: replace the [dot] with .
Hope for a better everything.
Image source: pixabay.com