Yes each input requires a different signature (even if they spend from the same address),

There are no signatures on the outputs. The full transaction, including its outputs, is covered by the signatures on the inputs. But you can somewhat modify (using sighash flags) what the signature covers (commits to) when you make the signature.

Reply to this note

Please Login to reply.

Discussion

Ok I think I get it, thank you. So in a case where we both want to spend our utxos together to a new address and we would both choose SH_ALL, we would both sign all inputs and outputs, correct?

My signature would commit to my input, your input, and our common output(s) and yours would do the same. I hope this is correct. Thanks again.

Yes, that's correct!

But I do think that various coinjoin protocols set different sighash flags. I guess nostr:npub1klkk3vrzme455yh9rl2jshq7rc8dpegj3ndf82c3ks2sk40dxt7qulx3vt can answer that.

iirc coinjoins use SH_ALL.