TransactionOutput class
Class that represents the output (UTXO) of a transaction.
When creating new transactions, the outputs can be :
- Locked up for another recipient to spend
- Locked up for ourselves to spend
- Represented as a "data" transaction by using
OP_FALSE OP_RETURN <data>
in the script - Represents any arbitrary bitcoin script on the BSV network after the Genesis restoration in February 2020.
Constructors
- TransactionOutput(BigInt amount, SVScript scriptPubKey)
- TransactionOutput.fromReader(ByteDataReader reader)
- Constructs a new Transaction output from a ByteDataReader that has been initialized with the raw transaction output data.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDataOut → bool
-
Convenience property to check if this output has been made unspendable
using either an OP_RETURN or "OP_FALSE OP_RETURN" in first positions of
the script.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- satoshis ↔ BigInt
-
Returns the number of satoshis the output is sending
getter/setter pair
- script ↔ SVScript
-
Returns the output script as a SVScript instance
getter/setter pair
- scriptHex → String
-
Returns the output script in it's raw hexadecimal form
no setter
Methods
-
invalidSatoshis(
) → bool - Returns true is satoshi amount if outside of valid range
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serialize(
) → List< int> - Returns a byte array containing the raw transaction output
-
toObject(
) → Map< String, dynamic> - Returns the Transaction output 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