function getPsigsFromInputFinalScripts(input) {
  const scriptItems = !input.finalScriptSig
    ? []
    : bscript.decompile(input.finalScriptSig) || [];
  const witnessItems = !input.finalScriptWitness
    ? []
    : bscript.decompile(input.finalScriptWitness) || [];
  return scriptItems
    .concat(witnessItems)
    .filter(item => {
      return (
        item instanceof Uint8Array && bscript.isCanonicalScriptSignature(item)
      );
    })
    .map(sig => ({ signature: sig }));
}
Retrieves the partial signatures (Psigs) from the input's final scripts.
Psigs are extracted from both the final scriptSig and final scriptWitness of the input.
Only canonical script signatures are considered.

@param input - The PsbtInput object representing the input.
@returns An array of PartialSig objects containing the extracted Psigs.