Lightning network: how are "only X can broadcast" transactions implemented?
Because the commitment transactions spend from a 2-of-2 output, the transaction cannot be broadcast unless both parties signed the transaction. So what LN does is it gives the other party an unsigned version of the transaction and that other party returns you that unsigned transaction with their signature. Because the other party only has the transaction with one signature, it is invalid and thus they cannot broadcast it. However you have that transaction with one signature, and you can then sign it with your own private keys and produce the full transaction with both signatures. Because you are the only person with that transaction, only you can broadcast it.