Class: Nis::Struct::MultisigTransaction

Inherits:
Object
  • Object
show all
Includes:
Util::Assignable
Defined in:
lib/nis/struct/multisig_transaction.rb

Overview

Constant Summary collapse

TYPE =

4099 (multisig transaction)

0x1004
FEE =
6_000_000

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Util::Assignable

#[], #initialize, #to_json

Instance Attribute Details

#deadlineInteger

Returns the current value of deadline.

Returns:

  • (Integer)

    the current value of deadline



10
11
12
# File 'lib/nis/struct/multisig_transaction.rb', line 10

def deadline
  @deadline
end

#feeInteger

Returns:

  • (Integer)


10
11
12
# File 'lib/nis/struct/multisig_transaction.rb', line 10

def fee
  @fee
end

#otherTransNis::Struct::TransferTransaction Also known as: other_trans

Returns the current value of otherTrans.

Returns:



10
11
12
# File 'lib/nis/struct/multisig_transaction.rb', line 10

def otherTrans
  @otherTrans
end

#signerString

Returns the current value of signer.

Returns:

  • (String)

    the current value of signer



10
11
12
# File 'lib/nis/struct/multisig_transaction.rb', line 10

def signer
  @signer
end

#timeStampInteger Also known as: timestamp

Returns the current value of timeStamp.

Returns:

  • (Integer)

    the current value of timeStamp



10
11
12
# File 'lib/nis/struct/multisig_transaction.rb', line 10

def timeStamp
  @timeStamp
end

#typeInteger

Returns the current value of type.

Returns:

  • (Integer)

    the current value of type



10
11
12
# File 'lib/nis/struct/multisig_transaction.rb', line 10

def type
  @type
end

#versionInteger

Returns the current value of version.

Returns:

  • (Integer)

    the current value of version



10
11
12
# File 'lib/nis/struct/multisig_transaction.rb', line 10

def version
  @version
end

Class Method Details

.build(attrs) ⇒ Object



23
24
25
# File 'lib/nis/struct/multisig_transaction.rb', line 23

def self.build(attrs)
  new(attrs)
end

Instance Method Details

#_versionInteger

Returns:

  • (Integer)


28
29
30
# File 'lib/nis/struct/multisig_transaction.rb', line 28

def _version
  (0xFFFFFFF0 & @version)
end

#calculate_feeInteger

Returns:

  • (Integer)


59
60
61
# File 'lib/nis/struct/multisig_transaction.rb', line 59

def calculate_fee
  FEE
end

#mainnet?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/nis/struct/multisig_transaction.rb', line 38

def mainnet?
  (0x0000000F & @version) == MAINNET
end

#mosaicsObject



47
48
49
# File 'lib/nis/struct/multisig_transaction.rb', line 47

def mosaics
  @mosaics ||= []
end

#testnet?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/nis/struct/multisig_transaction.rb', line 33

def testnet?
  (0x0000000F & @version) == TESTNET
end

#to_hashObject



53
54
55
56
# File 'lib/nis/struct/multisig_transaction.rb', line 53

def to_hash
  fee
  to_hash_old
end

#to_hash_oldObject



51
# File 'lib/nis/struct/multisig_transaction.rb', line 51

alias to_hash_old to_hash