class CardanoWallet::Shelley::StakePools

API for StakePools @see input-output-hk.github.io/cardano-wallet/api/edge/#tag/Stake-Pools

Public Instance Methods

delegation_fees(wid) click to toggle source

Estimate delegation fees @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/getDelegationFee

# File lib/cardano_wallet/shelley.rb, line 442
def delegation_fees(wid)
  self.class.get("/wallets/#{wid}/delegation-fees")
end
join(sp_id, wid, passphrase) click to toggle source

Join stake pool @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/joinStakePool

# File lib/cardano_wallet/shelley.rb, line 426
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 = {}) click to toggle source

List all stake pools @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/listStakePools

# File lib/cardano_wallet/shelley.rb, line 413
def list(stake = {})
  query = stake.empty? ? '' : Utils.to_query(stake)
  self.class.get("/stake-pools#{query}")
end
list_stake_keys(wid) click to toggle source

List all stake keys @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/listStakeKeys

# File lib/cardano_wallet/shelley.rb, line 420
def list_stake_keys(wid)
  self.class.get("/wallets/#{wid}/stake-keys")
end
quit(wid, passphrase) click to toggle source

Quit stape pool @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/quitStakePool

# File lib/cardano_wallet/shelley.rb, line 434
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 = {}) click to toggle source

Stake pools maintenance actions @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/postMaintenanceAction

@example

maintenance_action({ "maintenance_action": "gc_stake_pools" })
# File lib/cardano_wallet/shelley.rb, line 398
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() click to toggle source

Metdata GC Status @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/getMaintenanceActions

# File lib/cardano_wallet/shelley.rb, line 407
def view_maintenance_actions
  self.class.get('/stake-pools/maintenance-actions')
end