class WavesRubyClient::Asset

Attributes

id[RW]
name[RW]
url_id[RW]

Public Class Methods

btc() click to toggle source
# 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() click to toggle source
# File lib/waves_ruby_client/asset.rb, line 8
def self.waves
  new(name: 'WAVES', id: '', url_id: WavesRubyClient::WAVES_ASSET_ID)
end

Public Instance Methods

to_bytes() click to toggle source
# 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