TransactionHistory

class TransactionHistory(var chainSelector: ChainSelector, var tx: iTransaction) : BCHserializable

Constructors

Link copied to clipboard
constructor(chainSelector: ChainSelector, stream: BCHserialized)
constructor(stream: BCHserialized)
constructor(chainSelector: ChainSelector, tx: iTransaction)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var basisOverride: BigDecimal?
Link copied to clipboard
Link copied to clipboard

Confirmation block's hash, or null if unconfirmed

Link copied to clipboard

Confirmation block's height, or -1 meaning unconfirmed, Long.MIN means the tx is being removed from unconfirmed list (probably invalid)

Link copied to clipboard
var date: Long

Date this transaction was issued or confirmed in epoch milliseconds

Link copied to clipboard

RAM only: has this been changed since last saved to disk -- assume we are dirty if we just created this object

Link copied to clipboard

The wallet received this quantity in this transaction

Link copied to clipboard

Which indexes in this tx are this wallet receiving coins

Link copied to clipboard

Additional information the user may have attached to this payment

Link copied to clipboard

The wallet spent this quantity in this transaction

Link copied to clipboard

Which indexes in the tx are this wallet paying someone else

Link copied to clipboard

What fiat currency the priceWhenIssued field is denominated in

Link copied to clipboard
var priceWhenIssued: BigDecimal

Price of the crypto in fiat when this transaction was issued

Link copied to clipboard

Additional information wallet software may attach to this payment (for example, the TDPP domain)

Link copied to clipboard
var saleOverride: BigDecimal?
Link copied to clipboard

The output corresponding to outgoingIdxes

Link copied to clipboard

Functions

Link copied to clipboard
open override fun BCHdeserialize(stream: BCHserialized): BCHserialized
Link copied to clipboard
open override fun BCHserialize(format: SerializationType): BCHserialized
Link copied to clipboard
fun capGains(): BigDecimal

Calculate the capital gain or loss of this transaction based on info from the provided transaction history

Link copied to clipboard

Returns true if this transaction is marked as unconfirmed

Link copied to clipboard
open override fun serialize(stream: BCHserialized): BCHserialized
Link copied to clipboard
open fun toByteArray(format: SerializationType = SerializationType.UNKNOWN): ByteArray

flatten this record in preparation for storage to disk

Link copied to clipboard
open override fun toString(): String

Pretty print some information in this transaction history