Output.clone constructor

Output.clone(
  1. Output output
)

Implementation

factory Output.clone(Output output) {
  return new Output(
    script: output.script != null ? Uint8List.fromList(output.script!) : null,
    value: output.value,
    valueBuffer: output.valueBuffer != null
        ? Uint8List.fromList(output.valueBuffer!)
        : null,
    pubkeys: output.pubkeys != null
        ? output.pubkeys!.map((pubkey) => Uint8List.fromList(pubkey))
            as List<Uint8List>?
        : null,
    signatures: output.signatures != null
        ? output.signatures!.map((signature) =>
                signature != null ? Uint8List.fromList(signature) : null)
            as List<Uint8List?>?
        : null,
  );
}