Transaction class

Transaction

Constructors

Transaction()
Transaction.fromBuffer(Uint8List buffer, [bool noStrict = false])
Transaction From Buffer
factory
Transaction.fromHex(String hexString)
Transaction From Hex String
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
ins List
Inputs
getter/setter pair
locktime int
Lock Time
getter/setter pair
outs List
Outputs
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version int
Version Number
getter/setter pair

Methods

addInput(Uint8List hash, int index, {int? sequence, Uint8List? scriptSig}) → dynamic
Add input to Transaction Return index number of input
addOutput(Uint8List scriptPubKey, int value) → dynamic
Add output to Transaction Return index number of output
byteLength([bool allowWitness = true]) int
Get transaction byte length
clone() → dynamic
Get clone of transaction
getHash([bool forWitness = false]) Uint8List
Get transaction hash
getId() String
Get transaction id
hashForSignature(int inIndex, Uint8List prevOutScript, int hashType) Uint8List
Hash transaction for signing a specific input.
hashForWitnessV0(int inIndex, Uint8List prevOutScript, int value, int hashType) Uint8List
Hash transaction for signing a witness input
hasWitnesses() → dynamic
Transaction has witnesses Return bool
isCoinbase() bool
Is coinbase transaction
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setInputScript(int index, Uint8List scriptSig) → void
Set Input Script
setWitness(int index, List<Uint8List> witness) → void
Set Witness
toBuffer([Uint8List? buffer, int? initialOffset]) Uint8List
Transaction to Uint8List Buffer
toHex() String
Get transaction hex string
toString() String
A string representation of this object.
inherited
virtualSize() int
Get transaction virtual size;
weight() int
Get transaction weight

Operators

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

Static Properties

advancedTransactionFlag → dynamic
Advanced transaction flag
no setter
advancedTransactionMarker → dynamic
Advanced transaction marker flag
no setter
defaultSequence → dynamic
Default Sequence
no setter
sighashAll → dynamic
Sighash all flag
no setter
sighashAnyonecanpay → dynamic
Sighash anyone can pay flag
no setter
sighashNone → dynamic
Sighash none flag
no setter
sighashSingle → dynamic
Sighash single flag
no setter

Static Methods

isCoinbaseHash(Uint8List buffer) bool
IS coinbase hash