| | | 1 | | namespace NLightning.Domain.Node.Options; |
| | | 2 | | |
| | | 3 | | using Money; |
| | | 4 | | using Protocol.Constants; |
| | | 5 | | using Protocol.ValueObjects; |
| | | 6 | | |
| | | 7 | | public class NodeOptions |
| | | 8 | | { |
| | | 9 | | // private FeatureOptions _features; |
| | | 10 | | |
| | | 11 | | /// <summary> |
| | | 12 | | /// The network to connect to. Can be "mainnet", "testnet", or "regtest" |
| | | 13 | | /// </summary> |
| | 348 | 14 | | public BitcoinNetwork BitcoinNetwork { get; set; } = NetworkConstants.Mainnet; |
| | | 15 | | |
| | | 16 | | /// <summary> |
| | | 17 | | /// True if NLTG should run in Daemon mode (background) |
| | | 18 | | /// </summary> |
| | 0 | 19 | | public bool Daemon { get; set; } |
| | | 20 | | |
| | | 21 | | /// <summary> |
| | | 22 | | /// A list of dns seed servers to connect to |
| | | 23 | | /// </summary> |
| | 120 | 24 | | public List<string> DnsSeedServers { get; set; } = ["nlseed.nlightn.ing"]; |
| | | 25 | | |
| | | 26 | | /// <summary> |
| | | 27 | | /// Addresses/Interfaces to listen on for incoming connections |
| | | 28 | | /// </summary> |
| | | 29 | | /// <remarks> |
| | | 30 | | /// Addresses should be in the format "ip:port" or "hostname:port" |
| | | 31 | | /// </remarks> |
| | 120 | 32 | | public List<string> ListenAddresses { get; set; } = ["127.0.0.1:9735"]; |
| | | 33 | | |
| | | 34 | | /// <summary> |
| | | 35 | | /// List of Features the node offers/expects to/from peers |
| | | 36 | | /// </summary> |
| | | 37 | | /// <see cref="FeatureOptions"/> |
| | 120 | 38 | | public FeatureOptions Features { get; set; } = new(); |
| | | 39 | | |
| | | 40 | | /// <summary> |
| | | 41 | | /// Network timeout |
| | | 42 | | /// </summary> |
| | 120 | 43 | | public TimeSpan NetworkTimeout { get; set; } = TimeSpan.FromSeconds(15); |
| | | 44 | | |
| | 0 | 45 | | public bool MustTrimHtlcOutputs { get; set; } |
| | | 46 | | |
| | 300 | 47 | | public LightningMoney DustLimitAmount { get; set; } = LightningMoney.Satoshis(354); |
| | | 48 | | |
| | 0 | 49 | | public ulong DefaultCltvExpiry { get; set; } |
| | | 50 | | |
| | 64 | 51 | | public bool HasAnchorOutputs { get; set; } |
| | | 52 | | |
| | 120 | 53 | | public ushort MaxAcceptedHtlcs { get; set; } = 5; |
| | 120 | 54 | | public LightningMoney HtlcMinimumAmount { get; set; } = LightningMoney.Satoshis(1); |
| | 0 | 55 | | public uint Locktime { get; set; } |
| | 184 | 56 | | public ushort ToSelfDelay { get; set; } = 144; |
| | 120 | 57 | | public uint AllowUpToPercentageOfChannelFundsInFlight { get; set; } = 80; |
| | 120 | 58 | | public uint MinimumDepth { get; set; } = 3; |
| | 120 | 59 | | public LightningMoney MinimumChannelSize { get; set; } = LightningMoney.Satoshis(20_000); |
| | 120 | 60 | | public LightningMoney ChannelReserveAmount { get; set; } = LightningMoney.Satoshis(546); |
| | | 61 | | } |