Class: MoneroRPC::TransferClass

Inherits:
Object
  • Object
show all
Defined in:
lib/monero_rpc/transfer_class.rb

Direct Known Subclasses

IncomingTransfer, OutgoingTransfer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ TransferClass

Returns a new instance of TransferClass.



8
9
10
11
12
# File 'lib/monero_rpc/transfer_class.rb', line 8

def initialize(args={})
  args.each do |k,v|
    self.send("#{k}=", v)
  end
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def address
  @address
end

#amountObject

Returns the value of attribute amount.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def amount
  @amount
end

#confirmationsObject

Returns the value of attribute confirmations.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def confirmations
  @confirmations
end

#destinationsObject

Returns the value of attribute destinations.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def destinations
  @destinations
end

#double_spend_seenObject

Returns the value of attribute double_spend_seen.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def double_spend_seen
  @double_spend_seen
end

#feeObject

Returns the value of attribute fee.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def fee
  @fee
end

#heightObject

Returns the value of attribute height.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def height
  @height
end

#noteObject

Returns the value of attribute note.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def note
  @note
end

#payment_idObject

Returns the value of attribute payment_id.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def payment_id
  @payment_id
end

#subaddr_indexObject

Returns the value of attribute subaddr_index.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def subaddr_index
  @subaddr_index
end

#subaddr_indicesObject

Returns the value of attribute subaddr_indices.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def subaddr_indices
  @subaddr_indices
end

#suggested_confirmations_thresholdObject

Returns the value of attribute suggested_confirmations_threshold.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def suggested_confirmations_threshold
  @suggested_confirmations_threshold
end

#timestampObject

Returns the value of attribute timestamp.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def timestamp
  @timestamp
end

#txidObject

Returns the value of attribute txid.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def txid
  @txid
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def type
  @type
end

#unlock_timeObject

Returns the value of attribute unlock_time.



4
5
6
# File 'lib/monero_rpc/transfer_class.rb', line 4

def unlock_time
  @unlock_time
end

Instance Method Details

#confirmed?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/monero_rpc/transfer_class.rb', line 14

def confirmed?
  confirmations >= 10
end

#locked?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/monero_rpc/transfer_class.rb', line 22

def locked?
  raise "TODO"
end

#pending?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/monero_rpc/transfer_class.rb', line 18

def pending?
  height == 0
end