module Radiator::OperationTypes

See: github.com/steemit/steem-js/blob/766746adb5ded86380be982c844f4c269f7800ae/src/auth/serializer/src/operations.js

Constants

TYPES

Public Instance Methods

type(chain, key, param, value) click to toggle source
# File lib/radiator/operation_types.rb, line 138
def type(chain, key, param, value)
  return if value.nil?
  
  t = TYPES[key] or return value
  p = t[param] or return value
  
  if p == Hive::Type::Amount
    case chain
    when :steem then Steem::Type::Amount.new(value)
    else
      p.new(value)
    end
  else
    p.new(value)
  end
end