Class: CardanoWallet::Shelley::StakePools
- Defined in:
- lib/cardano_wallet/shelley.rb
Overview
API for StakePools
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#delegation_fees(wid) ⇒ Object
Estimate delegation fees.
-
#join(sp_id, wid, passphrase) ⇒ Object
Join stake pool.
-
#list(stake = {}) ⇒ Object
List all stake pools.
-
#list_stake_keys(wid) ⇒ Object
List all stake keys.
-
#quit(wid, passphrase) ⇒ Object
Quit stape pool.
-
#trigger_maintenance_actions(action = {}) ⇒ Object
Stake pools maintenance actions.
-
#view_maintenance_actions ⇒ Object
Metdata GC Status.
Methods inherited from Base
#byron, #initialize, #misc, #shared, #shelley, #utils
Constructor Details
This class inherits a constructor from CardanoWallet::Base
Instance Method Details
#delegation_fees(wid) ⇒ Object
Estimate delegation fees
524 525 526 |
# File 'lib/cardano_wallet/shelley.rb', line 524 def delegation_fees(wid) self.class.get("/wallets/#{wid}/delegation-fees") end |
#join(sp_id, wid, passphrase) ⇒ Object
Join stake pool
508 509 510 511 512 |
# File 'lib/cardano_wallet/shelley.rb', line 508 def join(sp_id, wid, passphrase) self.class.put("/stake-pools/#{sp_id}/wallets/#{wid}", body: { passphrase: passphrase }.to_json, headers: { 'Content-Type' => 'application/json' }) end |
#list(stake = {}) ⇒ Object
List all stake pools
495 496 497 498 |
# File 'lib/cardano_wallet/shelley.rb', line 495 def list(stake = {}) query = stake.empty? ? '' : Utils.to_query(stake) self.class.get("/stake-pools#{query}") end |
#list_stake_keys(wid) ⇒ Object
List all stake keys
502 503 504 |
# File 'lib/cardano_wallet/shelley.rb', line 502 def list_stake_keys(wid) self.class.get("/wallets/#{wid}/stake-keys") end |
#quit(wid, passphrase) ⇒ Object
Quit stape pool
516 517 518 519 520 |
# File 'lib/cardano_wallet/shelley.rb', line 516 def quit(wid, passphrase) self.class.delete("#{@api}/stake-pools/*/wallets/#{wid}", body: { passphrase: passphrase }.to_json, headers: { 'Content-Type' => 'application/json' }) end |
#trigger_maintenance_actions(action = {}) ⇒ Object
Stake pools maintenance actions
480 481 482 483 484 485 |
# File 'lib/cardano_wallet/shelley.rb', line 480 def trigger_maintenance_actions(action = {}) Utils.verify_param_is_hash!(action) self.class.post('/stake-pools/maintenance-actions', body: action.to_json, headers: { 'Content-Type' => 'application/json' }) end |
#view_maintenance_actions ⇒ Object
Metdata GC Status
489 490 491 |
# File 'lib/cardano_wallet/shelley.rb', line 489 def view_maintenance_actions self.class.get('/stake-pools/maintenance-actions') end |