Class: CardanoWallet::Shelley::Assets

Inherits:
Base
  • Object
show all
Defined in:
lib/cardano_wallet/shelley.rb

Overview

Base class for Shelley Assets API

Examples:

@cw = CardanoWallet.new
@cw.shelley.assets # API for Shelley assets

Instance Attribute Summary

Attributes inherited from Base

#opt

Instance Method Summary collapse

Methods inherited from Base

#byron, #initialize, #misc, #shared, #shelley, #utils

Constructor Details

This class inherits a constructor from CardanoWallet::Base

Instance Method Details

#get(wid, policy_id = nil, asset_name = nil) ⇒ Object



84
85
86
87
88
89
# File 'lib/cardano_wallet/shelley.rb', line 84

def get(wid, policy_id = nil, asset_name = nil)
  ep = "/wallets/#{wid}/assets"
  ep += "/#{policy_id}" if policy_id
  ep += "/#{asset_name}" if asset_name
  self.class.get(ep)
end