| | 1 | | using NBitcoin; |
| | 2 | |
|
| | 3 | | namespace NLightning.Infrastructure.Bitcoin.Transactions; |
| | 4 | |
|
| | 5 | | using Outputs; |
| | 6 | |
|
| | 7 | | public class HtlcTimeoutTransaction : BaseHtlcTransaction |
| | 8 | | { |
| | 9 | | public HtlcTimeoutTransaction(bool hasAnchorOutputs, Network network, BaseHtlcOutput output, |
| | 10 | | PubKey revocationPubKey, PubKey localDelayedPubKey, uint cltvEpiry, |
| | 11 | | ulong toSelfDelay, ulong amountMilliSats) |
| 0 | 12 | | : base(hasAnchorOutputs, network, output, revocationPubKey, localDelayedPubKey, toSelfDelay, amountMilliSats) |
| | 13 | | { |
| 0 | 14 | | SetLockTime(cltvEpiry); |
| 0 | 15 | | } |
| | 16 | |
|
| | 17 | | protected new void SignTransaction(params BitcoinSecret[] secrets) |
| | 18 | | { |
| 0 | 19 | | var witness = new WitScript( |
| 0 | 20 | | Op.GetPushOp(0), // OP_0 |
| 0 | 21 | | Op.GetPushOp(0), // Remote signature |
| 0 | 22 | | Op.GetPushOp(0), // Local signature |
| 0 | 23 | | Op.GetPushOp([]) // Payment pre-image for HTLC-success |
| 0 | 24 | | ); |
| | 25 | |
|
| 0 | 26 | | base.SignTransaction(secrets); |
| 0 | 27 | | } |
| | 28 | | } |