@@ -11,6 +11,7 @@ use crate::logger::LogLevel;
1111use crate :: payment:: SendingParameters ;
1212
1313use lightning:: ln:: msgs:: SocketAddress ;
14+ use lightning:: onion_message:: messenger:: Destination ;
1415use lightning:: routing:: gossip:: NodeAlias ;
1516use lightning:: util:: config:: ChannelConfig as LdkChannelConfig ;
1617use lightning:: util:: config:: MaxDustHTLCExposure as LdkMaxDustHTLCExposure ;
@@ -103,7 +104,8 @@ pub const WALLET_KEYS_SEED_LEN: usize = 64;
103104/// | `log_level` | Debug |
104105/// | `anchor_channels_config` | Some(..) |
105106/// | `sending_parameters` | None |
106- ///
107+ /// | `dns_resolvers` | None |
108+ ///
107109/// See [`AnchorChannelsConfig`] and [`SendingParameters`] for more information regarding their
108110/// respective default values.
109111///
@@ -167,6 +169,11 @@ pub struct Config {
167169 /// **Note:** If unset, default parameters will be used, and you will be able to override the
168170 /// parameters on a per-payment basis in the corresponding method calls.
169171 pub sending_parameters : Option < SendingParameters > ,
172+ /// The dns_resolver nodes (Destinations) to be used for resolving Human-readable Names.
173+ ///
174+ /// If set to `Some`, the values set will be used as dns_resolvers when sending to HRNs.
175+ /// **Note:** If set to `None`, payments to HRNs will fail.
176+ pub dns_resolvers : Option < Vec < Destination > > ,
170177}
171178
172179impl Default for Config {
@@ -181,6 +188,7 @@ impl Default for Config {
181188 anchor_channels_config : Some ( AnchorChannelsConfig :: default ( ) ) ,
182189 sending_parameters : None ,
183190 node_alias : None ,
191+ dns_resolvers : None ,
184192 }
185193 }
186194}
0 commit comments