| | 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 | | { |
| 472 | 10 | | public required PubKey RevocationPubKey { get; init; } |
| 472 | 11 | | public required PubKey RemoteHtlcPubKey { get; init; } |
| 472 | 12 | | public required PubKey LocalHtlcPubKey { get; init; } |
| 472 | 13 | | public ReadOnlyMemory<byte> PaymentHash { get; set; } |
| 512 | 14 | | public required ulong CltvExpiry { get; init; } |
| | 15 | |
|
| 472 | 16 | | protected BaseHtlcOutput(Script redeemScript, LightningMoney amount) : base(redeemScript, amount) |
| 472 | 17 | | { } |
| | 18 | |
|
| | 19 | | [SetsRequiredMembers] |
| | 20 | | protected BaseHtlcOutput(Script redeemScript, LightningMoney amount, PubKey revocationPubKey, |
| | 21 | | PubKey remoteHtlcPubKey, PubKey localHtlcPubKey, ReadOnlyMemory<byte> paymentHash, |
| | 22 | | ulong cltvExpiry) |
| 0 | 23 | | : base(redeemScript, amount) |
| | 24 | | { |
| 0 | 25 | | RevocationPubKey = revocationPubKey; |
| 0 | 26 | | RemoteHtlcPubKey = remoteHtlcPubKey; |
| 0 | 27 | | LocalHtlcPubKey = localHtlcPubKey; |
| 0 | 28 | | PaymentHash = paymentHash; |
| 0 | 29 | | CltvExpiry = cltvExpiry; |
| 0 | 30 | | } |
| | 31 | | } |