TransactionInput class

Class that represents the "input" to a transaction.

In bitcoin the transaction inputs of a new transaction are formed from what was the output of the previous transaction that we are "spending" from. In this way a chain of transactions are formed, and because each transaction contains a signature in the input, a chain of digital signatures representing change of ownership from one transaction to the next is also captured.

Constructors

TransactionInput(String? txId, int outputIndex, int? seqNumber, {UnlockingScriptBuilder? scriptBuilder})
Constructs a new transaction input
TransactionInput.fromReader(ByteDataReader reader, {UnlockingScriptBuilder? scriptBuilder = null})
Constructs a new Transaction input from a ByteDataReader that has been initialized with the raw transaction input data.

Properties

hashCode int
The hash code for this object.
no setterinherited
prevTxnId String
Returns the transaction Id of the transaction that this input is spending from
getter/setter pair
prevTxnOutputIndex int
Returns the index value of the transaction output (UTXO) that this input is spending from.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
script SVScript?
Returns the number of satoshis this input is spending. Sets the number of satoshis this input is spending.
getter/setter pair
scriptBuilder UnlockingScriptBuilder?
no setter
sequenceNumber int
Returns the signature associated with this TransactionInput
getter/setter pair

Methods

isCoinBase() bool
isFinal() bool
Returns true if the sequence number has reached it's maximum limit and can no longer be updated.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize() List<int>
Returns a buffer containing the serialized bytearray for this TransactionInput
toObject() Map<String, dynamic>
Returns the Transaction input as structured data to make working with JSON serializers easier.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

MAX_SEQ_NUMBER int
Maximum size an unsigned int can be. Used as value of sequenceNumber when we want to indicate that the transaction's Transaction.nLockTime should be ignored.
getter/setter pair
SEQUENCE_LOCKTIME_DISABLE_FLAG int
BIP68: If this flag set, sequence is NOT interpreted as a relative lock-time.
final
SEQUENCE_LOCKTIME_MASK int
BIP68: If sequence encodes a relative lock-time, this mask is applied to extract that lock-time from the sequence field.
final
SEQUENCE_LOCKTIME_TYPE_FLAG int
BIP68: If sequence encodes a relative lock-time and this flag is set, the relative lock-time has units of 512 seconds, otherwise it specifies blocks with a granularity of 1.
final