X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FInit.java;fp=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FInit.java;h=135adca35810b839b0658fc26013736c1a3e4a1c;hb=8fa2bcb208a51fa352d04981f1387d8bceced107;hp=8b0122395437448924633fe2a1f531d95eed8109;hpb=7da1092518e5ea1518255a4473c178f52549fd81;p=ldk-java diff --git a/src/main/java/org/ldk/structs/Init.java b/src/main/java/org/ldk/structs/Init.java index 8b012239..135adca3 100644 --- a/src/main/java/org/ldk/structs/Init.java +++ b/src/main/java/org/ldk/structs/Init.java @@ -44,6 +44,34 @@ public class Init extends CommonBase { if (this != null) { this.ptrs_to.add(val); }; } + /** + * Indicates chains the sender is interested in. + * + * If there are no common chains, the connection will be closed. + * + * Returns a copy of the field. + */ + public Option_CVec_ChainHashZZ get_networks() { + long ret = bindings.Init_get_networks(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_CVec_ChainHashZZ ret_hu_conv = org.ldk.structs.Option_CVec_ChainHashZZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Indicates chains the sender is interested in. + * + * If there are no common chains, the connection will be closed. + */ + public void set_networks(org.ldk.structs.Option_CVec_ChainHashZZ val) { + bindings.Init_set_networks(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + /** * The receipient's network address. * @@ -79,14 +107,16 @@ public class Init extends CommonBase { /** * Constructs a new Init given each field */ - public static Init of(org.ldk.structs.InitFeatures features_arg, org.ldk.structs.Option_NetAddressZ remote_network_address_arg) { - long ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr, remote_network_address_arg.ptr); + public static Init of(org.ldk.structs.InitFeatures features_arg, org.ldk.structs.Option_CVec_ChainHashZZ networks_arg, org.ldk.structs.Option_NetAddressZ remote_network_address_arg) { + long ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr, networks_arg.ptr, remote_network_address_arg.ptr); Reference.reachabilityFence(features_arg); + Reference.reachabilityFence(networks_arg); Reference.reachabilityFence(remote_network_address_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Init ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Init(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(features_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(networks_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(remote_network_address_arg); }; return ret_hu_conv; }