iTransaction

Properties

Link copied to clipboard

Which blockchain is this transaction for

Link copied to clipboard
abstract val fee: Long

What this transaction will be paying in transaction fees (might be calculated each time)

Link copied to clipboard
open val feeRate: Double

Transaction fee rate in satoshi/byte

Link copied to clipboard
abstract val id: Hash256

Return this transaction's id. If you change the transaction be sure to call changed() to update this value

Link copied to clipboard
abstract val idem: Hash256

Return this transaction's idem. If you change the transaction be sure to call changed() to update this value. Returns the id for blockchains that do not have an idem.

Link copied to clipboard
abstract val inputs: MutableList<out iTxInput>

inputs to this transaction

Link copied to clipboard
open val inputTotal: Long

Total quantity of satoshis spent (input into this transaction), including grouped satoshis

Link copied to clipboard
abstract var lockTime: Long

transaction lock time

Link copied to clipboard
abstract val outpoints: Array<out iTxOutpoint>

transaction outpoints (handles to the UTXO entries the outputs will generate)

Link copied to clipboard
abstract val outputs: MutableList<out iTxOutput>

outputs of this transaction

Link copied to clipboard
open val outputTotal: Long

Total quantity of satoshis sent (output from this transaction), including grouped satoshis

Link copied to clipboard
abstract val size: Long

transaction size in bytes

Link copied to clipboard
abstract var version: Int

transaction version

Functions

Link copied to clipboard
abstract fun add(input: iTxInput): iTransaction

Add an input to this transaction (at the end)

abstract fun add(output: iTxOutput): iTransaction

Add an output to this transaction (at the end)

Link copied to clipboard
fun iTransaction.addChange(wallet: Wallet, changeOverride: PayAddress? = null)
Link copied to clipboard
open fun amountSentTo(addr: PayAddress): Long
Link copied to clipboard
abstract fun appendableSighash(extendInputs: Boolean = true, extendOutputs: Boolean = true): ByteArray

Return the sighash that allows new inputs and/or outputs to be appended to the transaction (but commits to all existing inputs and outputs)

Link copied to clipboard
Link copied to clipboard
abstract fun BCHserialize(format: SerializationType = SerializationType.UNKNOWN): BCHserialized
Link copied to clipboard
abstract fun changed()

Communicate that this transaction has been changed, so recalculation of id and idem are needed

Link copied to clipboard
abstract fun debugDump()

Dump this transaction to stdout

Link copied to clipboard
abstract fun isCoinbase(): Boolean

return true if this is a coinbase transaction

Link copied to clipboard

Return true if this is an ownership challenge transaction. This means that this transaction is invalid and so can never be actually committed to the blockchain.

Link copied to clipboard
Link copied to clipboard
abstract fun setInputs(inputs: MutableList<out iTxInput>): iTransaction

Overwrite all inputs with the provided list

Link copied to clipboard
abstract fun setOutputs(outputs: MutableList<out iTxOutput>): iTransaction

Overwrite all outputs with the provided list

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

Serialize this transaction into a byte array (using network serialization)

Link copied to clipboard
abstract fun toHex(): String

Return the serialized hex representation