
"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_hbd
escrow_transfer
Old:steem_amount
,sbd_amount
New:hive_amount
,hbd_amount
escrow_release
Old:steem_amount
,sbd_amount
New:hive_amount
,hbd_amount
claim_reward_balance
Old:reward_steem
,reward_sbd
New:reward_hive
,reward_hbd
author_reward
(virtual operation)
Old:steem_payout
,sbd_payout
New:hive_payout
,hbd_payout
witness_update
Old:sbd_interest_rate
New:hbd_interest_rate
witness_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_blog
condenser_api.get_chain_properties
condenser_api.get_content
condenser_api.get_content_replies
condenser_api.get_discussions_by_*
condenser_api.get_dynamic_global_properties
condenser_api.get_market_history
condenser_api.get_ticker
condenser_api.get_version
condenser_api.get_volume
condenser_api.get_witness_by_account
condenser_api.get_witness_schedule
bridge.get_ranked_posts
- All
database_api
equivelants of the methods above database_api.list_escrows
database_api.find_sbd_conversion_requests
(method renamed)database_api.list_sbd_conversion_requests
(method renamed)database_api.find_witnesses
market_history_api.get_market_history
market_history_api.get_order_book
market_history_api.get_ticker
market_history_api.get_volume
tags_api.get_discussion
tags_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