Class: Nem::Model::Keypair

Inherits:
Object
  • Object
show all
Includes:
Nem::Mixin::Assignable
Defined in:
lib/nem/model/keypair.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Nem::Mixin::Assignable

#initialize

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



6
7
8
# File 'lib/nem/model/keypair.rb', line 6

def address
  @address
end

#private_keyObject (readonly)

Returns the value of attribute private_key.



6
7
8
# File 'lib/nem/model/keypair.rb', line 6

def private_key
  @private_key
end

#public_keyObject (readonly)

Returns the value of attribute public_key.



6
7
8
# File 'lib/nem/model/keypair.rb', line 6

def public_key
  @public_key
end

Class Method Details

.new_from_key_pair_view_model(hash) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/nem/model/keypair.rb', line 10

def self.new_from_key_pair_view_model(hash)
  new(
    private_key: hash[:privateKey],
    public_key: hash[:publicKey],
    address: hash[:address]
  )
end