| | | 1 | | // ReSharper disable PropertyCanBeMadeInitOnly.Global |
| | | 2 | | |
| | | 3 | | using NLightning.Domain.Channels.ValueObjects; |
| | | 4 | | |
| | | 5 | | namespace NLightning.Infrastructure.Persistence.Entities.Channel; |
| | | 6 | | |
| | | 7 | | /// <summary> |
| | | 8 | | /// Represents the configuration parameters for a Lightning Network channel. |
| | | 9 | | /// </summary> |
| | | 10 | | public class ChannelConfigEntity |
| | | 11 | | { |
| | | 12 | | /// <summary> |
| | | 13 | | /// The unique channel identifier this configuration belongs to. |
| | | 14 | | /// </summary> |
| | 0 | 15 | | public required ChannelId ChannelId { get; set; } |
| | | 16 | | |
| | | 17 | | /// <summary> |
| | | 18 | | /// The minimum number of confirmations required for the funding transaction. |
| | | 19 | | /// </summary> |
| | 0 | 20 | | public required uint MinimumDepth { get; set; } |
| | | 21 | | |
| | | 22 | | /// <summary> |
| | | 23 | | /// The number of blocks that the counterparty's to-self outputs must be delayed. |
| | | 24 | | /// </summary> |
| | 0 | 25 | | public required ushort ToSelfDelay { get; set; } |
| | | 26 | | |
| | | 27 | | /// <summary> |
| | | 28 | | /// The maximum number of HTLCs that can be pending at any given time. |
| | | 29 | | /// </summary> |
| | 0 | 30 | | public required ushort MaxAcceptedHtlcs { get; set; } |
| | | 31 | | |
| | | 32 | | /// <summary> |
| | | 33 | | /// The local minimum value for an output below which it should be considered dust and not included. |
| | | 34 | | /// </summary> |
| | 0 | 35 | | public required long LocalDustLimitAmountSats { get; set; } |
| | | 36 | | |
| | | 37 | | /// <summary> |
| | | 38 | | /// The remote minimum value for an output below which it should be considered dust and not included. |
| | | 39 | | /// </summary> |
| | 0 | 40 | | public required long RemoteDustLimitAmountSats { get; set; } |
| | | 41 | | |
| | | 42 | | /// <summary> |
| | | 43 | | /// The minimum value for an HTLC, expressed in millisatoshis. |
| | | 44 | | /// </summary> |
| | 0 | 45 | | public required ulong HtlcMinimumMsat { get; set; } |
| | | 46 | | |
| | | 47 | | /// <summary> |
| | | 48 | | /// The minimum amount that the counterparty must keep in its balance, if set. |
| | | 49 | | /// </summary> |
| | 0 | 50 | | public long? ChannelReserveAmountSats { get; set; } |
| | | 51 | | |
| | | 52 | | /// <summary> |
| | | 53 | | /// The maximum total value of all HTLCs that can be in-flight at any given time. |
| | | 54 | | /// </summary> |
| | 0 | 55 | | public required ulong MaxHtlcAmountInFlight { get; set; } |
| | | 56 | | |
| | | 57 | | /// <summary> |
| | | 58 | | /// The fee rate in satoshis per kiloweight to use for commitment transactions. |
| | | 59 | | /// </summary> |
| | 0 | 60 | | public required long FeeRatePerKwSatoshis { get; set; } |
| | | 61 | | |
| | | 62 | | /// <summary> |
| | | 63 | | /// Whether anchor outputs are enabled for this channel. |
| | | 64 | | /// </summary> |
| | 0 | 65 | | public required bool OptionAnchorOutputs { get; set; } |
| | | 66 | | |
| | | 67 | | /// <summary> |
| | | 68 | | /// The upfront shutdown script for the local node, if specified. |
| | | 69 | | /// </summary> |
| | 0 | 70 | | public byte[]? LocalUpfrontShutdownScript { get; set; } |
| | | 71 | | |
| | | 72 | | /// <summary> |
| | | 73 | | /// The upfront shutdown script for the remote node, if specified. |
| | | 74 | | /// </summary> |
| | 0 | 75 | | public byte[]? RemoteUpfrontShutdownScript { get; set; } |
| | | 76 | | |
| | 0 | 77 | | public byte UseScidAlias { get; set; } |
| | | 78 | | |
| | | 79 | | /// <summary> |
| | | 80 | | /// Default constructor for EF Core. |
| | | 81 | | /// </summary> |
| | 0 | 82 | | internal ChannelConfigEntity() |
| | | 83 | | { |
| | 0 | 84 | | } |
| | | 85 | | } |