[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / GossipTimestampFilter.cs
index 950c74220e34f505da30485647e665d2229d0b9e..e210877fabcfd879211668a2d6584ae987235624 100644 (file)
@@ -7,9 +7,11 @@ namespace org { namespace ldk { namespace structs {
 
 
 /**
- * A gossip_timestamp_filter message is used by a node to request
+ * A [`gossip_timestamp_filter`] message is used by a node to request
  * gossip relay for messages in the requested time range when the
- * gossip_queries feature has been negotiated.
+ * `gossip_queries` feature has been negotiated.
+ * 
+ * [`gossip_timestamp_filter`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-gossip_timestamp_filter-message
  */
 public class GossipTimestampFilter : CommonBase {
        internal GossipTimestampFilter(object _dummy, long ptr) : base(ptr) { }
@@ -21,16 +23,18 @@ public class GossipTimestampFilter : CommonBase {
         * The genesis hash of the blockchain for channel and node information
         */
        public byte[] get_chain_hash() {
-               byte[] ret = bindings.GossipTimestampFilter_get_chain_hash(this.ptr);
+               long ret = bindings.GossipTimestampFilter_get_chain_hash(this.ptr);
                GC.KeepAlive(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+               return ret_conv;
        }
 
        /**
         * The genesis hash of the blockchain for channel and node information
         */
        public void set_chain_hash(byte[] val) {
-               bindings.GossipTimestampFilter_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
+               bindings.GossipTimestampFilter_set_chain_hash(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32)));
                GC.KeepAlive(this);
                GC.KeepAlive(val);
        }
@@ -75,7 +79,7 @@ public class GossipTimestampFilter : CommonBase {
         * Constructs a new GossipTimestampFilter given each field
         */
        public static GossipTimestampFilter of(byte[] chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg) {
-               long ret = bindings.GossipTimestampFilter_new(InternalUtils.check_arr_len(chain_hash_arg, 32), first_timestamp_arg, timestamp_range_arg);
+               long ret = bindings.GossipTimestampFilter_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(chain_hash_arg, 32)), first_timestamp_arg, timestamp_range_arg);
                GC.KeepAlive(chain_hash_arg);
                GC.KeepAlive(first_timestamp_arg);
                GC.KeepAlive(timestamp_range_arg);
@@ -124,16 +128,18 @@ public class GossipTimestampFilter : CommonBase {
         * Serialize the GossipTimestampFilter object into a byte array which can be read by GossipTimestampFilter_read
         */
        public byte[] write() {
-               byte[] ret = bindings.GossipTimestampFilter_write(this.ptr);
+               long ret = bindings.GossipTimestampFilter_write(this.ptr);
                GC.KeepAlive(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+               return ret_conv;
        }
 
        /**
         * Read a GossipTimestampFilter from a byte array, created by GossipTimestampFilter_write
         */
        public static Result_GossipTimestampFilterDecodeErrorZ read(byte[] ser) {
-               long ret = bindings.GossipTimestampFilter_read(ser);
+               long ret = bindings.GossipTimestampFilter_read(InternalUtils.encodeUint8Array(ser));
                GC.KeepAlive(ser);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);