| | 1 | | using System.Diagnostics.CodeAnalysis; |
| | 2 | | using NBitcoin; |
| | 3 | |
|
| | 4 | | namespace NLightning.Infrastructure.Bitcoin.Outputs; |
| | 5 | |
|
| | 6 | | using Domain.Money; |
| | 7 | |
|
| | 8 | | public abstract class BaseHtlcOutput : BaseOutput |
| | 9 | | { |
| 148 | 10 | | public required PubKey RevocationPubKey { get; init; } |
| 148 | 11 | | public required PubKey RemoteHtlcPubKey { get; init; } |
| 148 | 12 | | public required PubKey LocalHtlcPubKey { get; init; } |
| 148 | 13 | | public ReadOnlyMemory<byte> PaymentHash { get; set; } |
| 180 | 14 | | public required ulong CltvExpiry { get; init; } |
| | 15 | |
|
| 148 | 16 | | protected BaseHtlcOutput(LightningMoney amount, Script redeemScript) : base(amount, redeemScript) |
| 148 | 17 | | { } |
| | 18 | |
|
| | 19 | | [SetsRequiredMembers] |
| | 20 | | protected BaseHtlcOutput(LightningMoney amount, ulong cltvExpiry, PubKey localHtlcPubKey, |
| | 21 | | ReadOnlyMemory<byte> paymentHash, Script redeemScript, PubKey remoteHtlcPubKey, |
| | 22 | | PubKey revocationPubKey) |
| 0 | 23 | | : base(amount, redeemScript) |
| | 24 | | { |
| 0 | 25 | | RevocationPubKey = revocationPubKey; |
| 0 | 26 | | RemoteHtlcPubKey = remoteHtlcPubKey; |
| 0 | 27 | | LocalHtlcPubKey = localHtlcPubKey; |
| 0 | 28 | | PaymentHash = paymentHash; |
| 0 | 29 | | CltvExpiry = cltvExpiry; |
| 0 | 30 | | } |
| | 31 | | } |