@@ -114,7 +114,7 @@ pub const WALLET_KEYS_SEED_LEN: usize = 64;
114114/// | `log_level` | Debug |
115115/// | `anchor_channels_config` | Some(..) |
116116/// | `route_parameters` | None |
117- /// | `is_hrn_resolver ` | false |
117+ /// | `hrn_config ` | None |
118118///
119119/// See [`AnchorChannelsConfig`] and [`RouteParametersConfig`] for more information regarding their
120120/// respective default values.
@@ -179,8 +179,10 @@ pub struct Config {
179179 /// **Note:** If unset, default parameters will be used, and you will be able to override the
180180 /// parameters on a per-payment basis in the corresponding method calls.
181181 pub route_parameters : Option < RouteParametersConfig > ,
182- /// This allows us to use our node as a DNS resolver for 3rd party HRN resolutions.
183- pub is_hrn_resolver : bool ,
182+ /// Configuration options for Human-Readable Names ([BIP 353]).
183+ ///
184+ /// [BIP 353]: https://github.com/bitcoin/bips/blob/master/bip-0353.mediawiki
185+ pub hrn_config : Option < HumanReadableNamesConfig > ,
184186}
185187
186188impl Default for Config {
@@ -195,11 +197,28 @@ impl Default for Config {
195197 anchor_channels_config : Some ( AnchorChannelsConfig :: default ( ) ) ,
196198 route_parameters : None ,
197199 node_alias : None ,
198- is_hrn_resolver : false ,
200+ hrn_config : None ,
199201 }
200202 }
201203}
202204
205+ /// Configuration options for Human-Readable Names ([BIP 353]).
206+ ///
207+ /// [BIP 353]: https://github.com/bitcoin/bips/blob/master/bip-0353.mediawiki
208+ #[ derive( Debug , Clone ) ]
209+ pub struct HumanReadableNamesConfig {
210+ /// The Default DNS resolvers to be used for resolving Human-Readable Names.
211+ ///
212+ /// If not empty, the values set will be used as DNS resolvers when sending to HRNs.
213+ ///
214+ /// **Note:** If empty, DNS resolvers would be selected from the network graph.
215+ pub default_dns_resolvers : Vec < PublicKey > ,
216+ /// This allows us to use our node as a DNS resolver for 3rd party HRN resolutions.
217+ pub is_hrn_resolver : bool ,
218+ /// The DNS Server which will be used for resolving HRNs.
219+ pub dns_server_address : String ,
220+ }
221+
203222/// Configuration options pertaining to 'Anchor' channels, i.e., channels for which the
204223/// `option_anchors_zero_fee_htlc_tx` channel type is negotiated.
205224///
0 commit comments