class WavesRubyClient::OrderData::UserOrders

Data for querying user orders

Public Instance Methods

data_with_signature() click to toggle source
# File lib/waves_ruby_client/order_data/user_orders.rb, line 10
def data_with_signature
  { Timestamp: timestamp.to_s,
    Signature: signature }
end

Private Instance Methods

bytes_to_sign() click to toggle source
# File lib/waves_ruby_client/order_data/user_orders.rb, line 29
def bytes_to_sign
  base58_to_bytes(WavesRubyClient::WAVES_PUBLIC_KEY) + long_to_bytes(timestamp)
end
signature() click to toggle source
# File lib/waves_ruby_client/order_data/user_orders.rb, line 17
def signature
  sign_bytes = Axlsign.sign(
    base58_to_bytes(WavesRubyClient::WAVES_PRIVATE_KEY),
    bytes_to_sign
  )
  bytes_to_base58(sign_bytes)
end
timestamp() click to toggle source
# File lib/waves_ruby_client/order_data/user_orders.rb, line 25
def timestamp
  @timestamp ||= Time.now.to_i * 1000
end