Class: WavesRubyClient::Asset
- Inherits:
-
Object
- Object
- WavesRubyClient::Asset
- Includes:
- ActiveModel::Model
- Defined in:
- lib/waves_ruby_client/asset.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#url_id ⇒ Object
Returns the value of attribute url_id.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/waves_ruby_client/asset.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/waves_ruby_client/asset.rb', line 6 def name @name end |
#url_id ⇒ Object
Returns the value of attribute url_id.
6 7 8 |
# File 'lib/waves_ruby_client/asset.rb', line 6 def url_id @url_id end |
Class Method Details
.btc ⇒ Object
12 13 14 15 |
# File 'lib/waves_ruby_client/asset.rb', line 12 def self.btc new(name: 'BTC', id: WavesRubyClient::BTC_ASSET_ID, url_id: WavesRubyClient::BTC_ASSET_ID) end |
.waves ⇒ Object
8 9 10 |
# File 'lib/waves_ruby_client/asset.rb', line 8 def self.waves new(name: 'WAVES', id: '', url_id: WavesRubyClient::WAVES_ASSET_ID) end |
Instance Method Details
#to_bytes ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/waves_ruby_client/asset.rb', line 17 def to_bytes if name == WavesRubyClient::WAVES_ASSET_ID [0] else [1].concat(WavesRubyClient::Conversion.base58_to_bytes(id)) end end |