Signs the transaction input and adds the signature as the first element of the witness.
This function assumes the input is a taproot script spend and uses sig hash default.
Wraps the script in an envelope with the protocol id “cat”.
Adds [num_witness_elements] OP_DROPs so the witness can be provided
with the transaction still being valid.
The script is then locked to a OP_CHECKSIG with the [signer_pk].