BtcTransaction constructor

BtcTransaction({
  1. required List<TxInput> inputs,
  2. required List<TxOutput> outputs,
  3. List<TxWitnessInput> w = const [],
  4. bool hasSegwit = false,
  5. Uint8List? lock,
  6. Uint8List? v,
})

Implementation

BtcTransaction(
    {required this.inputs,
    required this.outputs,
    List<TxWitnessInput> w = const [],
    this.hasSegwit = false,
    Uint8List? lock,
    Uint8List? v})
    : locktime = lock ?? Uint8List.fromList(DEFAULT_TX_LOCKTIME),
      version = v ?? Uint8List.fromList(DEFAULT_TX_VERSION) {
  witnesses.addAll(w);
}