Class: Nem::Transaction::Multisig

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

Overview

Constant Summary collapse

TYPE =

4100 (multisig transaction)

0x1004

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(trans, signer, timestamp: nil, deadline: nil, network: nil) ⇒ Multisig

Returns a new instance of Multisig.



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

def initialize(trans, signer, timestamp: nil, deadline: nil, network: nil)
  @other_trans = trans
  @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_transNem::Transaction::*

Returns the current value of other_trans.

Returns:



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

def other_trans
  @other_trans
end

#signerString

Returns the current value of signer.

Returns:

  • (String)

    the current value of signer



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

def signer
  @signer
end

Instance Method Details

#to_hashHash

attributes must be CAMEL CASE for NIS params

Returns:

  • (Hash)


24
25
26
27
28
29
# File 'lib/nem/transaction/multisig.rb', line 24

def to_hash
  {
    otherTrans: other_trans.to_hash,
    signer: signer
  }
end