Input.clone constructor

Input.clone(
  1. Input input
)

Implementation

factory Input.clone(Input input) {
  return new Input(
    hash: input.hash != null ? Uint8List.fromList(input.hash!) : null,
    index: input.index,
    script: input.script != null ? Uint8List.fromList(input.script!) : null,
    sequence: input.sequence,
    value: input.value,
    prevOutScript: input.prevOutScript != null
        ? Uint8List.fromList(input.prevOutScript!)
        : null,
    pubkeys: input.pubkeys != null
        ? input.pubkeys!.map((pubkey) =>
                pubkey != null ? Uint8List.fromList(pubkey) : null)
            as List<Uint8List?>?
        : null,
    signatures: input.signatures != null
        ? input.signatures!.map((signature) =>
                signature != null ? Uint8List.fromList(signature) : null)
            as List<Uint8List?>?
        : null,
  );
}