Class: Nem::Transaction::MultisigSignature

Inherits:
Base
  • Object
show all
Defined in:
lib/nem/transaction/multisig_signature.rb

Constant Summary collapse

TYPE =

4098 (multisig signature transaction)

0x1002

Constants inherited from Base

Base::NETWORK

Instance Attribute Summary collapse

Attributes inherited from Base

#deadline, #fee, #signature, #timestamp, #type

Instance Method Summary collapse

Methods inherited from Base

#network, #version

Constructor Details

#initialize(other_hash, other_account, signer, timestamp: nil, deadline: nil, network: nil) ⇒ MultisigSignature

Returns a new instance of MultisigSignature.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/nem/transaction/multisig_signature.rb', line 11

def initialize(other_hash, , signer, timestamp: nil, deadline: nil, network: nil)
  @other_hash = other_hash
  @other_account = 
  @signer = signer

  @network = network || Nem.default_network
  @type = TYPE
  @fee = Nem::Fee::Multisig.new(self)
  @timestamp = timestamp || Time.now
  @deadline = deadline || Time.now + Nem.default_deadline
end

Instance Attribute Details

#other_accountString

Returns the current value of other_account.

Returns:

  • (String)

    the current value of other_account



6
7
8
# File 'lib/nem/transaction/multisig_signature.rb', line 6

def 
  @other_account
end

#other_hashString

Returns the current value of other_hash.

Returns:

  • (String)

    the current value of other_hash



6
7
8
# File 'lib/nem/transaction/multisig_signature.rb', line 6

def other_hash
  @other_hash
end

#signerString

Returns the current value of signer.

Returns:

  • (String)

    the current value of signer



6
7
8
# File 'lib/nem/transaction/multisig_signature.rb', line 6

def signer
  @signer
end

Instance Method Details

#to_hashHash

attributes must be CAMEL CASE for NIS params

Returns:

  • (Hash)


25
26
27
28
29
30
31
# File 'lib/nem/transaction/multisig_signature.rb', line 25

def to_hash
  {
    otherHash: { data: other_hash },
    otherAccount: ,
    signer: signer
  }
end