OutputBase.clone constructor

OutputBase.clone(
  1. OutputBase output
)

Implementation

factory OutputBase.clone(OutputBase output) {
  return OutputBase(
    type: output.type,
    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) =>
                pubkey != null ? Uint8List.fromList(pubkey) : null)
            as List<Uint8List>?
        : null,
    signatures: output.signatures != null
        ? output.signatures!.map((signature) =>
                signature != null ? Uint8List.fromList(signature) : null)
            as List<Uint8List?>?
        : null,
  );
}