- bindings.UnsignedChannelAnnouncement_free(ptr);
- }
-
- public UnsignedChannelAnnouncement(UnsignedChannelAnnouncement orig) {
- super(bindings.UnsignedChannelAnnouncement_clone(orig == null ? 0 : orig.ptr & ~1));
- this.ptrs_to.add(orig);
+ if (ptr != 0) { bindings.UnsignedChannelAnnouncement_free(ptr); }
+ }
+
+ /**
+ * The advertised channel features
+ */
+ public ChannelFeatures get_features() {
+ long ret = bindings.UnsignedChannelAnnouncement_get_features(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ ChannelFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelFeatures(null, ret); }
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * The advertised channel features
+ */
+ public void set_features(ChannelFeatures val) {
+ bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The genesis hash of the blockchain where the channel is to be opened
+ */
+ public byte[] get_chain_hash() {
+ byte[] ret = bindings.UnsignedChannelAnnouncement_get_chain_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;