6 namespace org { namespace ldk { namespace structs {
10 * Features used within an `init` message.
12 public class InitFeatures : CommonBase {
13 internal InitFeatures(object _dummy, long ptr) : base(ptr) { }
15 if (ptr != 0) { bindings.InitFeatures_free(ptr); }
19 * Checks if two InitFeaturess contain equal inner contents.
20 * This ignores pointers and is_owned flags and looks at the values in fields.
21 * Two objects with NULL inner values will be considered "equal" here.
23 public bool eq(org.ldk.structs.InitFeatures b) {
24 bool ret = bindings.InitFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
27 if (this != null) { this.ptrs_to.AddLast(b); };
31 public override bool Equals(object o) {
32 if (!(o is InitFeatures)) return false;
33 return this.eq((InitFeatures)o);
35 internal long clone_ptr() {
36 long ret = bindings.InitFeatures_clone_ptr(this.ptr);
42 * Creates a copy of the InitFeatures
44 public InitFeatures clone() {
45 long ret = bindings.InitFeatures_clone(this.ptr);
47 if (ret >= 0 && ret <= 4096) { return null; }
48 org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); }
49 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
54 * Create a blank Features with no features set
56 public static InitFeatures empty() {
57 long ret = bindings.InitFeatures_empty();
58 if (ret >= 0 && ret <= 4096) { return null; }
59 org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); }
60 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
65 * Returns true if this `Features` object contains unknown feature flags which are set as
68 public bool requires_unknown_bits() {
69 bool ret = bindings.InitFeatures_requires_unknown_bits(this.ptr);
75 * Serialize the InitFeatures object into a byte array which can be read by InitFeatures_read
77 public byte[] write() {
78 byte[] ret = bindings.InitFeatures_write(this.ptr);
84 * Read a InitFeatures from a byte array, created by InitFeatures_write
86 public static Result_InitFeaturesDecodeErrorZ read(byte[] ser) {
87 long ret = bindings.InitFeatures_read(ser);
89 if (ret >= 0 && ret <= 4096) { return null; }
90 Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
95 * Set this feature as optional.
97 public void set_data_loss_protect_optional() {
98 bindings.InitFeatures_set_data_loss_protect_optional(this.ptr);
103 * Set this feature as required.
105 public void set_data_loss_protect_required() {
106 bindings.InitFeatures_set_data_loss_protect_required(this.ptr);
111 * Checks if this feature is supported.
113 public bool supports_data_loss_protect() {
114 bool ret = bindings.InitFeatures_supports_data_loss_protect(this.ptr);
120 * Checks if this feature is required.
122 public bool requires_data_loss_protect() {
123 bool ret = bindings.InitFeatures_requires_data_loss_protect(this.ptr);
129 * Set this feature as optional.
131 public void set_initial_routing_sync_optional() {
132 bindings.InitFeatures_set_initial_routing_sync_optional(this.ptr);
137 * Set this feature as required.
139 public void set_initial_routing_sync_required() {
140 bindings.InitFeatures_set_initial_routing_sync_required(this.ptr);
145 * Checks if this feature is supported.
147 public bool initial_routing_sync() {
148 bool ret = bindings.InitFeatures_initial_routing_sync(this.ptr);
154 * Set this feature as optional.
156 public void set_upfront_shutdown_script_optional() {
157 bindings.InitFeatures_set_upfront_shutdown_script_optional(this.ptr);
162 * Set this feature as required.
164 public void set_upfront_shutdown_script_required() {
165 bindings.InitFeatures_set_upfront_shutdown_script_required(this.ptr);
170 * Checks if this feature is supported.
172 public bool supports_upfront_shutdown_script() {
173 bool ret = bindings.InitFeatures_supports_upfront_shutdown_script(this.ptr);
179 * Checks if this feature is required.
181 public bool requires_upfront_shutdown_script() {
182 bool ret = bindings.InitFeatures_requires_upfront_shutdown_script(this.ptr);
188 * Set this feature as optional.
190 public void set_gossip_queries_optional() {
191 bindings.InitFeatures_set_gossip_queries_optional(this.ptr);
196 * Set this feature as required.
198 public void set_gossip_queries_required() {
199 bindings.InitFeatures_set_gossip_queries_required(this.ptr);
204 * Checks if this feature is supported.
206 public bool supports_gossip_queries() {
207 bool ret = bindings.InitFeatures_supports_gossip_queries(this.ptr);
213 * Checks if this feature is required.
215 public bool requires_gossip_queries() {
216 bool ret = bindings.InitFeatures_requires_gossip_queries(this.ptr);
222 * Set this feature as optional.
224 public void set_variable_length_onion_optional() {
225 bindings.InitFeatures_set_variable_length_onion_optional(this.ptr);
230 * Set this feature as required.
232 public void set_variable_length_onion_required() {
233 bindings.InitFeatures_set_variable_length_onion_required(this.ptr);
238 * Checks if this feature is supported.
240 public bool supports_variable_length_onion() {
241 bool ret = bindings.InitFeatures_supports_variable_length_onion(this.ptr);
247 * Checks if this feature is required.
249 public bool requires_variable_length_onion() {
250 bool ret = bindings.InitFeatures_requires_variable_length_onion(this.ptr);
256 * Set this feature as optional.
258 public void set_static_remote_key_optional() {
259 bindings.InitFeatures_set_static_remote_key_optional(this.ptr);
264 * Set this feature as required.
266 public void set_static_remote_key_required() {
267 bindings.InitFeatures_set_static_remote_key_required(this.ptr);
272 * Checks if this feature is supported.
274 public bool supports_static_remote_key() {
275 bool ret = bindings.InitFeatures_supports_static_remote_key(this.ptr);
281 * Checks if this feature is required.
283 public bool requires_static_remote_key() {
284 bool ret = bindings.InitFeatures_requires_static_remote_key(this.ptr);
290 * Set this feature as optional.
292 public void set_payment_secret_optional() {
293 bindings.InitFeatures_set_payment_secret_optional(this.ptr);
298 * Set this feature as required.
300 public void set_payment_secret_required() {
301 bindings.InitFeatures_set_payment_secret_required(this.ptr);
306 * Checks if this feature is supported.
308 public bool supports_payment_secret() {
309 bool ret = bindings.InitFeatures_supports_payment_secret(this.ptr);
315 * Checks if this feature is required.
317 public bool requires_payment_secret() {
318 bool ret = bindings.InitFeatures_requires_payment_secret(this.ptr);
324 * Set this feature as optional.
326 public void set_basic_mpp_optional() {
327 bindings.InitFeatures_set_basic_mpp_optional(this.ptr);
332 * Set this feature as required.
334 public void set_basic_mpp_required() {
335 bindings.InitFeatures_set_basic_mpp_required(this.ptr);
340 * Checks if this feature is supported.
342 public bool supports_basic_mpp() {
343 bool ret = bindings.InitFeatures_supports_basic_mpp(this.ptr);
349 * Checks if this feature is required.
351 public bool requires_basic_mpp() {
352 bool ret = bindings.InitFeatures_requires_basic_mpp(this.ptr);
358 * Set this feature as optional.
360 public void set_wumbo_optional() {
361 bindings.InitFeatures_set_wumbo_optional(this.ptr);
366 * Set this feature as required.
368 public void set_wumbo_required() {
369 bindings.InitFeatures_set_wumbo_required(this.ptr);
374 * Checks if this feature is supported.
376 public bool supports_wumbo() {
377 bool ret = bindings.InitFeatures_supports_wumbo(this.ptr);
383 * Checks if this feature is required.
385 public bool requires_wumbo() {
386 bool ret = bindings.InitFeatures_requires_wumbo(this.ptr);
392 * Set this feature as optional.
394 public void set_shutdown_any_segwit_optional() {
395 bindings.InitFeatures_set_shutdown_any_segwit_optional(this.ptr);
400 * Set this feature as required.
402 public void set_shutdown_any_segwit_required() {
403 bindings.InitFeatures_set_shutdown_any_segwit_required(this.ptr);
408 * Checks if this feature is supported.
410 public bool supports_shutdown_anysegwit() {
411 bool ret = bindings.InitFeatures_supports_shutdown_anysegwit(this.ptr);
417 * Checks if this feature is required.
419 public bool requires_shutdown_anysegwit() {
420 bool ret = bindings.InitFeatures_requires_shutdown_anysegwit(this.ptr);
426 * Set this feature as optional.
428 public void set_onion_messages_optional() {
429 bindings.InitFeatures_set_onion_messages_optional(this.ptr);
434 * Set this feature as required.
436 public void set_onion_messages_required() {
437 bindings.InitFeatures_set_onion_messages_required(this.ptr);
442 * Checks if this feature is supported.
444 public bool supports_onion_messages() {
445 bool ret = bindings.InitFeatures_supports_onion_messages(this.ptr);
451 * Checks if this feature is required.
453 public bool requires_onion_messages() {
454 bool ret = bindings.InitFeatures_requires_onion_messages(this.ptr);
460 * Set this feature as optional.
462 public void set_channel_type_optional() {
463 bindings.InitFeatures_set_channel_type_optional(this.ptr);
468 * Set this feature as required.
470 public void set_channel_type_required() {
471 bindings.InitFeatures_set_channel_type_required(this.ptr);
476 * Checks if this feature is supported.
478 public bool supports_channel_type() {
479 bool ret = bindings.InitFeatures_supports_channel_type(this.ptr);
485 * Checks if this feature is required.
487 public bool requires_channel_type() {
488 bool ret = bindings.InitFeatures_requires_channel_type(this.ptr);
494 * Set this feature as optional.
496 public void set_scid_privacy_optional() {
497 bindings.InitFeatures_set_scid_privacy_optional(this.ptr);
502 * Set this feature as required.
504 public void set_scid_privacy_required() {
505 bindings.InitFeatures_set_scid_privacy_required(this.ptr);
510 * Checks if this feature is supported.
512 public bool supports_scid_privacy() {
513 bool ret = bindings.InitFeatures_supports_scid_privacy(this.ptr);
519 * Checks if this feature is required.
521 public bool requires_scid_privacy() {
522 bool ret = bindings.InitFeatures_requires_scid_privacy(this.ptr);
528 * Set this feature as optional.
530 public void set_zero_conf_optional() {
531 bindings.InitFeatures_set_zero_conf_optional(this.ptr);
536 * Set this feature as required.
538 public void set_zero_conf_required() {
539 bindings.InitFeatures_set_zero_conf_required(this.ptr);
544 * Checks if this feature is supported.
546 public bool supports_zero_conf() {
547 bool ret = bindings.InitFeatures_supports_zero_conf(this.ptr);
553 * Checks if this feature is required.
555 public bool requires_zero_conf() {
556 bool ret = bindings.InitFeatures_requires_zero_conf(this.ptr);