Class: EverSdk::Crypto::ParamsOfAppSigningBox

Inherits:
Object
  • Object
show all
Defined in:
lib/ever_sdk_client/crypto.rb

Constant Summary collapse

TYPES =
[:get_public_key, :sign]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type_:, unsigned:) ⇒ ParamsOfAppSigningBox

Returns a new instance of ParamsOfAppSigningBox.



208
209
210
211
212
213
214
# File 'lib/ever_sdk_client/crypto.rb', line 208

def initialize(type_:, unsigned:)
  unless TYPES.include?(type_)
    raise ArgumentError.new("type #{type_} is unknown; known types: #{TYPES}")
  end
  @type_ = type_
  @unsigned = unsigned
end

Instance Attribute Details

#type_Object (readonly)

Returns the value of attribute type_.



206
207
208
# File 'lib/ever_sdk_client/crypto.rb', line 206

def type_
  @type_
end

#unsignedObject (readonly)

Returns the value of attribute unsigned.



206
207
208
# File 'lib/ever_sdk_client/crypto.rb', line 206

def unsigned
  @unsigned
end

Instance Method Details

#to_hObject



216
217
218
219
220
221
# File 'lib/ever_sdk_client/crypto.rb', line 216

def to_h
  {
    type: Helper.sym_to_capitalized_case_str(@type_),
    unsigned: @unsigned
  }
end