inertia186 / radiator

Hive Ruby API Client
https://hive.blog/hive-139531/@inertia/radiator-v0-4-8-hive-ruby-api-client-eclipse-update
Other
50 stars 22 forks source link

Golos change API #25

Closed baybak closed 6 years ago

baybak commented 6 years ago

Golos change API structure in HF17. Please check it.

inertia186 commented 6 years ago

I only briefly looked into this. At the moment, it seems to me that Golos now only suports wss (WebSocket). Radiator will never support wss, only https.

baybak commented 6 years ago

suport ws and http https://github.com/GolosChain/golos/blob/v0.17.1RC1/share/golosd/config/config_witness.ini

webserver-http-endpoint = 0.0.0.0:8090 webserver-ws-endpoint = 0.0.0.0:8091

require 'radiator'

api = Radiator::Api.new(chain: :golos)
api.get_dynamic_global_properties do | a|
  puts a
end

#<Hashie::Mash average_block_size=492 confidential_sbd_supply="0.000 GBG" confidential_supply="0.000 GOLOS" current_aslot=15372272 current_reserve_ratio=20000 current_sbd_supply="17363478.083 GBG" current_supply="135412222.251 GOLOS" current_witness="dr2073" head_block_id="00e990685df908e31e15ea47d83e481d0d5fb75c" head_block_number=15306856 id=0 last_irreversible_block_num=15306841 max_virtual_bandwidth="5986734968066277376" maximum_block_size=65536 num_pow_witnesses=1 participation_count=124 recent_slots_filled="340282366918461355569517174874307559423" sbd_interest_rate=1000 sbd_print_rate=0 time="2018-04-05T05:13:36" total_pow=746869 total_reward_fund_steem="60384.402 GOLOS" total_reward_shares2="32094263203029628" total_vesting_fund_steem="95403924.809 GOLOS" total_vesting_shares="348780934535.456426 GESTS" virtual_supply="147531929.952 GOLOS" vote_regeneration_per_day=40>

baybak commented 6 years ago

https://developers.golos.io/doc/blockchain

inertia186 commented 6 years ago

See #26