OrInstance is String) {
    hash = Uint8List.fromList(HEX.decode(txHashOrInstance).reversed.toList());
  } else if (txHashOrInstance is Uint8List) {
    hash = txHashOrInstance;
  } else if (txHashOrInstance is Transaction) {
    final txOut = txHashOrInstance.outputs[vout];
    prevOutScript = txOut.script;
    value = txOut.value;
    hash = txHashOrInstance.getHash();
  } else {
    throw ArgumentError(&#39;txHash invalid&#39;);
  }

  return _addInputUnsafe(hash, vout, new Input(sequence: sequence, prev