Tx class

Mixed-in types
Implementers

Constructors

Tx({int version = currentVersion, required List<TxInput> inputs, required List<TxOutput> outputs, int locktime = 0, Uint8List? mwebBytes})
Tx.fromBytes(Uint8List bytes)
factory
Tx.fromHex(String hex)
factory
Tx.fromReader(WireReader reader)
factory

Properties

complete bool
no setter
hashCode int
The hash code for this object.
no setterinherited
inputs List<TxInput>
final
isWitness bool
no setter
locktime int
final
mwebBytes Uint8List?
Litecoin MWEB extension-block bytes (Slice A: opaque blob, see EXPAND_MWEB.md). Present only when the segwit flag has bit 3 (0x08) set. These bytes are serialized immediately before locktime and are excluded from txid/wtxid and legacy sighash preimages, matching Litecoin Core's SERIALIZE_NO_MWEB. The internal MWEB structure is NOT parsed.
final
outputs List<TxOutput>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
txid String
no setter
version int
final
wireSize int
no setterinherited
wtxid String
Witness transaction id (wtxid): includes witness data but EXCLUDES the MWEB extension block, matching Litecoin Core ComputeWitnessHash (SERIALIZE_NO_MWEB alone). For a non-witness, non-MWEB tx this equals txid.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBytes() Uint8List
inherited
toHex() String
inherited
toString() String
A string representation of this object.
inherited
writeTo(WireWriting writer) → void
override

Operators

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

Static Methods

readBody(WireReader reader) TxBody
Reads everything after the version word: inputs, outputs, optional witness data, an optional Litecoin MWEB extension block, and locktime. The reader must be positioned immediately after the 4-byte version.

Constants

currentVersion → const int
maxSize → const int