Class: TezosClient::Tools::HashToMicheline

Inherits:
ActiveInteraction::Base
  • Object
show all
Defined in:
lib/tezos_client/tools/hash_to_micheline.rb

Constant Summary collapse

TYPES_MAPPING =

TODO: handle Arrays and Maps

{
  int: :int,
  nat: :int,
  string: :string,
  signature: :string,
  bytes: :bytes,
  timestamp: :int,
  key: :string,
  address: :string
}.freeze

Instance Method Summary collapse

Instance Method Details

#executeObject



31
32
33
34
35
# File 'lib/tezos_client/tools/hash_to_micheline.rb', line 31

def execute
  return hash_type_to_hash_data(_storage_type.fetch(:prim), params.values.first) if params.size == 1

  { prim: "Pair", args: generate_micheline(_storage_type[:args]) }
end