Tx class

Constructors

Tx({int? versionBytesNum, VarInt? txInsVi, List<TxIn>? txIns, VarInt? txOutsVi, List<TxOut>? txOuts, int? nLockTime})
Tx.fromBuffer(List<int> buf)
factory
Tx.fromHex(String str)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
nLockTime int?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
txIns List<TxIn>?
getter/setter pair
txInsVi VarInt?
getter/setter pair
txOuts List<TxOut>?
getter/setter pair
txOutsVi VarInt?
getter/setter pair
versionBytesNum int?
getter/setter pair

Methods

addTxIn({dynamic data, int? txOutNum, Script? script, int? nSequence}) Tx
addTxOut({dynamic data, Script? script}) Tx
cloneByBuffer() Tx
fromBr(Br br) Tx
fromBuffer(List<int> buf) Tx
fromHex(String str) Tx
fromJSON(Map json) Tx
hash() Hash
Creates a combined hash code for a number of objects.
override
hashOutputs() Hash
hashPrevouts() Hash
hashSequence() Hash
id() String
isCoinbase() bool
Analagous to bitcoind's IsCoinBase in transaction.h
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sighash({required int nHashType, int? nIn, Script? subScript, BigIntX? valueBn, int? flags = 0, HashCache? hashCache}) List<int>
For a normal transaction, subScript is usually the scriptPubKey. For a p2sh transaction, subScript is usually the redeemScript. If you're not normal because you're using OP_CODESEPARATORs, you know what to do.
sighashPreimage({required int nHashType, int? nIn, Script? subScript, BigIntX? valueBn, int? flags = 0, HashCache? hashCache}) List<int>
sign({KeyPair? keyPair, int nHashType = Sig.SIGHASH_ALL | Sig.SIGHASH_FORKID, int? nIn, Script? subScript, BigIntX? valueBn, int flags = Tx.SCRIPT_ENABLE_SIGHASH_FORKID, HashCache? hashCache}) Sig
sort() Tx
BIP 69 sorting. Be sure to sign after sorting.
toBuffer() List<int>
toBw([Bw? bw]) Bw
toHex() String
toJSON() Map<String, Object?>
toString() String
A string representation of this object.
override
verify({required Sig sig, PubKey? pubKey, int? nIn, Script? subScript, bool enforceLowS = false, BigIntX? valueBn, int? flags = Tx.SCRIPT_ENABLE_SIGHASH_FORKID, HashCache? hashCache}) bool?

Operators

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

Constants

MAX_MONEY → const int
SCRIPT_ENABLE_SIGHASH_FORKID → const int