public Transaction BuildWithSignatures(TransactionSignature remotePubKeySignature) { var unsigned = Build(); var localPubKeySignature = SignClosingTransaction(unsigned); var witScript = MultiSignatureWitnessScript.Create( _channel.LocalCommitmentTxParameters.FundingKey, _channel.RemoteCommitmentTxParameters.FundingKey, localPubKeySignature, remotePubKeySignature); unsigned.Inputs[0].ScriptSig = Script.Empty; unsigned.Inputs[0].WitScript = witScript; return(unsigned); }
public Transaction BuildWithSignatures(TransactionSignature remotePubKeySignature, Key fundingPrivateKey) { var unsigned = Build(); var localPubKeySignature = SignCommitmentTransaction(fundingPrivateKey, unsigned); var witScript = MultiSignatureWitnessScript.Create( CommitmentTxParams.FundingKey, RemoteFundingPubKey, localPubKeySignature, remotePubKeySignature); unsigned.Inputs[0].ScriptSig = Script.Empty; unsigned.Inputs[0].WitScript = witScript; return(unsigned); }