Class: Bytom::CoreConfig
- Inherits:
-
Object
- Object
- Bytom::CoreConfig
- Defined in:
- lib/bytom/api/core_config.rb
Instance Method Summary collapse
- #gas_rate ⇒ Object
-
#initialize(client) ⇒ CoreConfig
constructor
A new instance of CoreConfig.
-
#is_mining ⇒ Object
Returns the mining status.
-
#net_info ⇒ Object
Returns the information of current network node.
-
#set_mining(is_mining: true) ⇒ Object
Start up node mining.
Constructor Details
#initialize(client) ⇒ CoreConfig
Returns a new instance of CoreConfig.
6 7 8 |
# File 'lib/bytom/api/core_config.rb', line 6 def initialize(client) @client = client end |
Instance Method Details
#gas_rate ⇒ Object
17 18 19 |
# File 'lib/bytom/api/core_config.rb', line 17 def gas_rate client.make_request('/gas-rate', 'post', params: {}) end |
#is_mining ⇒ Object
Returns the mining status.
24 25 26 |
# File 'lib/bytom/api/core_config.rb', line 24 def is_mining client.make_request('/is-mining', 'post', params: {}) end |
#net_info ⇒ Object
Returns the information of current network node.
13 14 15 |
# File 'lib/bytom/api/core_config.rb', line 13 def net_info client.make_request('/net-info', 'post', params: {}) end |
#set_mining(is_mining: true) ⇒ Object
Start up node mining.
31 32 33 |
# File 'lib/bytom/api/core_config.rb', line 31 def set_mining(is_mining: true) client.make_request('/set-mining', 'post', params: {is_mining: is_mining}) end |