Example #1
0
        private void SignRemoteCommitmentTx(LocalChannel channel)
        {
            var builder = new CommitmentTransactionBuilder(channel, false, _networkParameters);

            Transaction rawTransaction    = builder.Build();
            Key         fundingPrivateKey = new Key(channel.LocalCommitmentTxParameters.FundingKey.PrivateKeyData);

            channel.RemoteCommitmentTxParameters.LocalSignature = builder.SignCommitmentTransaction(fundingPrivateKey, rawTransaction);
            _channelLoggingService.LogInfo(channel, "Remote Commitment Transaction", rawTransaction.ToString());
        }
Example #2
0
        public bool IsValidRemoteCommitmentSignature(LocalChannel channel, TransactionSignature signature)
        {
            var builder = new CommitmentTransactionBuilder(channel, true, _networkParameters);

            return(builder.IsValidSignature(signature, channel.LocalCommitmentTxParameters.FundingKey));
        }