Class: Nis::Transaction::MosaicSupplyChange

Inherits:
Object
  • Object
show all
Includes:
Mixin::Struct
Defined in:
lib/nis/transaction/mosaic_supply_change.rb

Overview

Constant Summary collapse

TYPE =

16386 (mosaic supply change transaction)

0x4002
INCREASE =
0x0001
DECREASE =
0x0002

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Mixin::Struct

#[], #to_hash, #to_json

Constructor Details

#initialize(mosaic_id, type, delta, network: :testnet) ⇒ MosaicSupplyChange

Returns a new instance of MosaicSupplyChange.



33
34
35
36
37
38
39
40
41
# File 'lib/nis/transaction/mosaic_supply_change.rb', line 33

def initialize(mosaic_id, type, delta, network: :testnet)
  @type = TYPE
  @network = network

  @mosaicId = mosaic_id
  @supplyType = parse_type(type)
  @delta = delta
  @fee = Nis::Fee::MosaicSupplyChangeTransfer.new(self)
end

Instance Attribute Details

#deadlineInteger

Returns the current value of deadline.

Returns:

  • (Integer)

    the current value of deadline



14
15
16
# File 'lib/nis/transaction/mosaic_supply_change.rb', line 14

def deadline
  @deadline
end

#deltaInteger

Returns the current value of delta.

Returns:

  • (Integer)

    the current value of delta



14
15
16
# File 'lib/nis/transaction/mosaic_supply_change.rb', line 14

def delta
  @delta
end

#feeInteger

Returns the current value of fee.

Returns:

  • (Integer)

    the current value of fee



14
15
16
# File 'lib/nis/transaction/mosaic_supply_change.rb', line 14

def fee
  @fee
end

#mosaic_idNis::Struct::MosaicId

Returns the current value of mosaic_id.

Returns:



14
15
16
# File 'lib/nis/transaction/mosaic_supply_change.rb', line 14

def mosaic_id
  @mosaic_id
end

#mosaicIdObject Also known as: mosaid_id

Returns the value of attribute mosaicId.



18
19
20
# File 'lib/nis/transaction/mosaic_supply_change.rb', line 18

def mosaicId
  @mosaicId
end

#networkSymbol

Returns the current value of network.

Returns:

  • (Symbol)

    the current value of network



14
15
16
# File 'lib/nis/transaction/mosaic_supply_change.rb', line 14

def network
  @network
end

#signatureString

Returns the current value of signature.

Returns:

  • (String)

    the current value of signature



14
15
16
# File 'lib/nis/transaction/mosaic_supply_change.rb', line 14

def signature
  @signature
end

#signerString

Returns the current value of signer.

Returns:

  • (String)

    the current value of signer



14
15
16
# File 'lib/nis/transaction/mosaic_supply_change.rb', line 14

def signer
  @signer
end

#supplyTypeSymbol Also known as: supply_type

Returns the current value of supplyType.

Returns:

  • (Symbol)

    the current value of supplyType



14
15
16
# File 'lib/nis/transaction/mosaic_supply_change.rb', line 14

def supplyType
  @supplyType
end

#timeStampInteger Also known as: timestamp

Returns the current value of timeStamp.

Returns:

  • (Integer)

    the current value of timeStamp



14
15
16
# File 'lib/nis/transaction/mosaic_supply_change.rb', line 14

def timeStamp
  @timeStamp
end

#typeInteger

Returns the current value of type.

Returns:

  • (Integer)

    the current value of type



14
15
16
# File 'lib/nis/transaction/mosaic_supply_change.rb', line 14

def type
  @type
end

#versionInteger

Returns the current value of version.

Returns:

  • (Integer)

    the current value of version



14
15
16
# File 'lib/nis/transaction/mosaic_supply_change.rb', line 14

def version
  @version
end