Fix write method generation w/ upstream changes
authorMatt Corallo <git@bluematt.me>
Tue, 27 Oct 2020 01:48:28 +0000 (21:48 -0400)
committerMatt Corallo <git@bluematt.me>
Tue, 27 Oct 2020 01:48:28 +0000 (21:48 -0400)
27 files changed:
src/main/java/org/ldk/impl/bindings.java
src/main/java/org/ldk/structs/ChannelKeys.java
src/main/java/org/ldk/structs/ChannelManager.java
src/main/java/org/ldk/structs/ChannelMonitor.java
src/main/java/org/ldk/structs/ChannelMonitorUpdate.java
src/main/java/org/ldk/structs/ChannelReestablish.java
src/main/java/org/ldk/structs/ErrorMessage.java
src/main/java/org/ldk/structs/GossipTimestampFilter.java
src/main/java/org/ldk/structs/HolderCommitmentTransaction.java
src/main/java/org/ldk/structs/InMemoryChannelKeys.java
src/main/java/org/ldk/structs/Init.java
src/main/java/org/ldk/structs/NetworkGraph.java
src/main/java/org/ldk/structs/NodeAnnouncementInfo.java
src/main/java/org/ldk/structs/NodeInfo.java
src/main/java/org/ldk/structs/Ping.java
src/main/java/org/ldk/structs/Pong.java
src/main/java/org/ldk/structs/QueryChannelRange.java
src/main/java/org/ldk/structs/QueryShortChannelIds.java
src/main/java/org/ldk/structs/ReplyChannelRange.java
src/main/java/org/ldk/structs/ReplyShortChannelIdsEnd.java
src/main/java/org/ldk/structs/Route.java
src/main/java/org/ldk/structs/RoutingFees.java
src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java
src/main/java/org/ldk/structs/UnsignedChannelUpdate.java
src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java
src/main/jni/bindings.c
src/main/jni/org_ldk_impl_bindings.h

index 3d0dfd99e729e84df27dc2363442df183af9bd41..097aa22037352e7cda7159c188483f08d47ed134 100644 (file)
@@ -347,6 +347,7 @@ public class bindings {
                 long sign_closing_transaction(byte[] closing_tx);
                 long sign_channel_announcement(long msg);
                 void on_accept(long channel_points, short counterparty_selected_contest_delay, short holder_selected_contest_delay);
+                byte[] write();
        }
        public static native long LDKChannelKeys_new(LDKChannelKeys impl, long pubkeys);
        public static native LDKChannelKeys LDKChannelKeys_get_obj_from_jcalls(long val);
@@ -372,6 +373,8 @@ public class bindings {
        public static native long ChannelKeys_sign_channel_announcement(long this_arg, long msg);
        // void ChannelKeys_on_accept LDKChannelKeys* this_arg, const LDKChannelPublicKeys *channel_points, uint16_t counterparty_selected_contest_delay, uint16_t holder_selected_contest_delay
        public static native void ChannelKeys_on_accept(long this_arg, long channel_points, short counterparty_selected_contest_delay, short holder_selected_contest_delay);
+       // LDKCVec_u8Z ChannelKeys_write LDKChannelKeys* this_arg
+       public static native byte[] ChannelKeys_write(long this_arg);
        // LDKChannelPublicKeys ChannelKeys_get_pubkeys LDKChannelKeys* this_arg
        public static native long ChannelKeys_get_pubkeys(long this_arg);
        public static native long[] LDKCVecTempl_MonitorEvent_arr_info(long vec_ptr);
@@ -962,8 +965,8 @@ public class bindings {
        public static native long ChannelMonitorUpdate_get_update_id(long this_ptr);
        // void ChannelMonitorUpdate_set_update_id(LDKChannelMonitorUpdate *this_ptr, uint64_t val);
        public static native void ChannelMonitorUpdate_set_update_id(long this_ptr, long val);
-       // LDKCVec_u8Z ChannelMonitorUpdate_write(const LDKChannelMonitorUpdate *obj);
-       public static native byte[] ChannelMonitorUpdate_write(long obj);
+       // LDKCVec_u8Z ChannelMonitorUpdate_write(const LDKChannelMonitorUpdate *this_ptr);
+       public static native byte[] ChannelMonitorUpdate_write(long this_ptr);
        // LDKChannelMonitorUpdate ChannelMonitorUpdate_read(LDKu8slice ser);
        public static native long ChannelMonitorUpdate_read(byte[] ser);
        // LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const LDKChannelMonitorUpdateErr *orig);
@@ -984,6 +987,8 @@ public class bindings {
        public static native long HTLCUpdate_read(byte[] ser);
        // void ChannelMonitor_free(LDKChannelMonitor this_ptr);
        public static native void ChannelMonitor_free(long this_ptr);
+       // LDKCVec_u8Z ChannelMonitor_write(const LDKChannelMonitor *this_ptr);
+       public static native byte[] ChannelMonitor_write(long this_ptr);
        // MUST_USE_RES LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(LDKChannelMonitor *this_arg, LDKChannelMonitorUpdate updates, const LDKBroadcasterInterface *broadcaster, const LDKLogger *logger);
        public static native long ChannelMonitor_update_monitor(long this_arg, long updates, long broadcaster, long logger);
        // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const LDKChannelMonitor *this_arg);
@@ -1068,8 +1073,8 @@ public class bindings {
        public static native short InMemoryChannelKeys_holder_selected_contest_delay(long this_arg);
        // LDKChannelKeys InMemoryChannelKeys_as_ChannelKeys(const LDKInMemoryChannelKeys *this_arg);
        public static native long InMemoryChannelKeys_as_ChannelKeys(long this_arg);
-       // LDKCVec_u8Z InMemoryChannelKeys_write(const LDKInMemoryChannelKeys *obj);
-       public static native byte[] InMemoryChannelKeys_write(long obj);
+       // LDKCVec_u8Z InMemoryChannelKeys_write(const LDKInMemoryChannelKeys *this_ptr);
+       public static native byte[] InMemoryChannelKeys_write(long this_ptr);
        // LDKInMemoryChannelKeys InMemoryChannelKeys_read(LDKu8slice ser);
        public static native long InMemoryChannelKeys_read(byte[] ser);
        // void KeysManager_free(LDKKeysManager this_ptr);
@@ -1162,6 +1167,8 @@ public class bindings {
        public static native void ChannelManager_block_disconnected(long this_arg, byte[] header);
        // LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const LDKChannelManager *this_arg);
        public static native long ChannelManager_as_ChannelMessageHandler(long this_arg);
+       // LDKCVec_u8Z ChannelManager_write(const LDKChannelManager *this_ptr);
+       public static native byte[] ChannelManager_write(long this_ptr);
        // void ChannelManagerReadArgs_free(LDKChannelManagerReadArgs this_ptr);
        public static native void ChannelManagerReadArgs_free(long this_ptr);
        // const LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const LDKChannelManagerReadArgs *this_ptr);
@@ -1914,8 +1921,8 @@ public class bindings {
        public static native byte[] AnnouncementSignatures_write(long obj);
        // LDKAnnouncementSignatures AnnouncementSignatures_read(LDKu8slice ser);
        public static native long AnnouncementSignatures_read(byte[] ser);
-       // LDKCVec_u8Z ChannelReestablish_write(const LDKChannelReestablish *obj);
-       public static native byte[] ChannelReestablish_write(long obj);
+       // LDKCVec_u8Z ChannelReestablish_write(const LDKChannelReestablish *this_ptr);
+       public static native byte[] ChannelReestablish_write(long this_ptr);
        // LDKChannelReestablish ChannelReestablish_read(LDKu8slice ser);
        public static native long ChannelReestablish_read(byte[] ser);
        // LDKCVec_u8Z ClosingSigned_write(const LDKClosingSigned *obj);
@@ -1938,8 +1945,8 @@ public class bindings {
        public static native byte[] FundingLocked_write(long obj);
        // LDKFundingLocked FundingLocked_read(LDKu8slice ser);
        public static native long FundingLocked_read(byte[] ser);
-       // LDKCVec_u8Z Init_write(const LDKInit *obj);
-       public static native byte[] Init_write(long obj);
+       // LDKCVec_u8Z Init_write(const LDKInit *this_ptr);
+       public static native byte[] Init_write(long this_ptr);
        // LDKInit Init_read(LDKu8slice ser);
        public static native long Init_read(byte[] ser);
        // LDKCVec_u8Z OpenChannel_write(const LDKOpenChannel *obj);
@@ -1974,36 +1981,36 @@ public class bindings {
        public static native byte[] UpdateAddHTLC_write(long obj);
        // LDKUpdateAddHTLC UpdateAddHTLC_read(LDKu8slice ser);
        public static native long UpdateAddHTLC_read(byte[] ser);
-       // LDKCVec_u8Z Ping_write(const LDKPing *obj);
-       public static native byte[] Ping_write(long obj);
+       // LDKCVec_u8Z Ping_write(const LDKPing *this_ptr);
+       public static native byte[] Ping_write(long this_ptr);
        // LDKPing Ping_read(LDKu8slice ser);
        public static native long Ping_read(byte[] ser);
-       // LDKCVec_u8Z Pong_write(const LDKPong *obj);
-       public static native byte[] Pong_write(long obj);
+       // LDKCVec_u8Z Pong_write(const LDKPong *this_ptr);
+       public static native byte[] Pong_write(long this_ptr);
        // LDKPong Pong_read(LDKu8slice ser);
        public static native long Pong_read(byte[] ser);
-       // LDKCVec_u8Z UnsignedChannelAnnouncement_write(const LDKUnsignedChannelAnnouncement *obj);
-       public static native byte[] UnsignedChannelAnnouncement_write(long obj);
+       // LDKCVec_u8Z UnsignedChannelAnnouncement_write(const LDKUnsignedChannelAnnouncement *this_ptr);
+       public static native byte[] UnsignedChannelAnnouncement_write(long this_ptr);
        // LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_read(LDKu8slice ser);
        public static native long UnsignedChannelAnnouncement_read(byte[] ser);
        // LDKCVec_u8Z ChannelAnnouncement_write(const LDKChannelAnnouncement *obj);
        public static native byte[] ChannelAnnouncement_write(long obj);
        // LDKChannelAnnouncement ChannelAnnouncement_read(LDKu8slice ser);
        public static native long ChannelAnnouncement_read(byte[] ser);
-       // LDKCVec_u8Z UnsignedChannelUpdate_write(const LDKUnsignedChannelUpdate *obj);
-       public static native byte[] UnsignedChannelUpdate_write(long obj);
+       // LDKCVec_u8Z UnsignedChannelUpdate_write(const LDKUnsignedChannelUpdate *this_ptr);
+       public static native byte[] UnsignedChannelUpdate_write(long this_ptr);
        // LDKUnsignedChannelUpdate UnsignedChannelUpdate_read(LDKu8slice ser);
        public static native long UnsignedChannelUpdate_read(byte[] ser);
        // LDKCVec_u8Z ChannelUpdate_write(const LDKChannelUpdate *obj);
        public static native byte[] ChannelUpdate_write(long obj);
        // LDKChannelUpdate ChannelUpdate_read(LDKu8slice ser);
        public static native long ChannelUpdate_read(byte[] ser);
-       // LDKCVec_u8Z ErrorMessage_write(const LDKErrorMessage *obj);
-       public static native byte[] ErrorMessage_write(long obj);
+       // LDKCVec_u8Z ErrorMessage_write(const LDKErrorMessage *this_ptr);
+       public static native byte[] ErrorMessage_write(long this_ptr);
        // LDKErrorMessage ErrorMessage_read(LDKu8slice ser);
        public static native long ErrorMessage_read(byte[] ser);
-       // LDKCVec_u8Z UnsignedNodeAnnouncement_write(const LDKUnsignedNodeAnnouncement *obj);
-       public static native byte[] UnsignedNodeAnnouncement_write(long obj);
+       // LDKCVec_u8Z UnsignedNodeAnnouncement_write(const LDKUnsignedNodeAnnouncement *this_ptr);
+       public static native byte[] UnsignedNodeAnnouncement_write(long this_ptr);
        // LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_read(LDKu8slice ser);
        public static native long UnsignedNodeAnnouncement_read(byte[] ser);
        // LDKCVec_u8Z NodeAnnouncement_write(const LDKNodeAnnouncement *obj);
@@ -2012,24 +2019,24 @@ public class bindings {
        public static native long NodeAnnouncement_read(byte[] ser);
        // LDKQueryShortChannelIds QueryShortChannelIds_read(LDKu8slice ser);
        public static native long QueryShortChannelIds_read(byte[] ser);
-       // LDKCVec_u8Z QueryShortChannelIds_write(const LDKQueryShortChannelIds *obj);
-       public static native byte[] QueryShortChannelIds_write(long obj);
+       // LDKCVec_u8Z QueryShortChannelIds_write(const LDKQueryShortChannelIds *this_ptr);
+       public static native byte[] QueryShortChannelIds_write(long this_ptr);
        // LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_read(LDKu8slice ser);
        public static native long ReplyShortChannelIdsEnd_read(byte[] ser);
-       // LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const LDKReplyShortChannelIdsEnd *obj);
-       public static native byte[] ReplyShortChannelIdsEnd_write(long obj);
+       // LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const LDKReplyShortChannelIdsEnd *this_ptr);
+       public static native byte[] ReplyShortChannelIdsEnd_write(long this_ptr);
        // LDKQueryChannelRange QueryChannelRange_read(LDKu8slice ser);
        public static native long QueryChannelRange_read(byte[] ser);
-       // LDKCVec_u8Z QueryChannelRange_write(const LDKQueryChannelRange *obj);
-       public static native byte[] QueryChannelRange_write(long obj);
+       // LDKCVec_u8Z QueryChannelRange_write(const LDKQueryChannelRange *this_ptr);
+       public static native byte[] QueryChannelRange_write(long this_ptr);
        // LDKReplyChannelRange ReplyChannelRange_read(LDKu8slice ser);
        public static native long ReplyChannelRange_read(byte[] ser);
-       // LDKCVec_u8Z ReplyChannelRange_write(const LDKReplyChannelRange *obj);
-       public static native byte[] ReplyChannelRange_write(long obj);
+       // LDKCVec_u8Z ReplyChannelRange_write(const LDKReplyChannelRange *this_ptr);
+       public static native byte[] ReplyChannelRange_write(long this_ptr);
        // LDKGossipTimestampFilter GossipTimestampFilter_read(LDKu8slice ser);
        public static native long GossipTimestampFilter_read(byte[] ser);
-       // LDKCVec_u8Z GossipTimestampFilter_write(const LDKGossipTimestampFilter *obj);
-       public static native byte[] GossipTimestampFilter_write(long obj);
+       // LDKCVec_u8Z GossipTimestampFilter_write(const LDKGossipTimestampFilter *this_ptr);
+       public static native byte[] GossipTimestampFilter_write(long this_ptr);
        // void MessageHandler_free(LDKMessageHandler this_ptr);
        public static native void MessageHandler_free(long this_ptr);
        // const LDKChannelMessageHandler *MessageHandler_get_chan_handler(const LDKMessageHandler *this_ptr);
@@ -2216,8 +2223,8 @@ public class bindings {
        public static native byte[] HolderCommitmentTransaction_get_holder_sig(long this_arg, byte[] funding_key, byte[] funding_redeemscript, long channel_value_satoshis);
        // MUST_USE_RES LDKCResult_CVec_SignatureZNoneZ HolderCommitmentTransaction_get_htlc_sigs(const LDKHolderCommitmentTransaction *this_arg, const uint8_t (*htlc_base_key)[32], uint16_t counterparty_selected_contest_delay);
        public static native long HolderCommitmentTransaction_get_htlc_sigs(long this_arg, byte[] htlc_base_key, short counterparty_selected_contest_delay);
-       // LDKCVec_u8Z HolderCommitmentTransaction_write(const LDKHolderCommitmentTransaction *obj);
-       public static native byte[] HolderCommitmentTransaction_write(long obj);
+       // LDKCVec_u8Z HolderCommitmentTransaction_write(const LDKHolderCommitmentTransaction *this_ptr);
+       public static native byte[] HolderCommitmentTransaction_write(long this_ptr);
        // LDKHolderCommitmentTransaction HolderCommitmentTransaction_read(LDKu8slice ser);
        public static native long HolderCommitmentTransaction_read(byte[] ser);
        // void InitFeatures_free(LDKInitFeatures this_ptr);
@@ -2264,8 +2271,8 @@ public class bindings {
        public static native void Route_set_paths(long this_ptr, long[][] val);
        // MUST_USE_RES LDKRoute Route_new(LDKCVec_CVec_RouteHopZZ paths_arg);
        public static native long Route_new(long[][] paths_arg);
-       // LDKCVec_u8Z Route_write(const LDKRoute *obj);
-       public static native byte[] Route_write(long obj);
+       // LDKCVec_u8Z Route_write(const LDKRoute *this_ptr);
+       public static native byte[] Route_write(long this_ptr);
        // LDKRoute Route_read(LDKu8slice ser);
        public static native long Route_read(byte[] ser);
        // void RouteHint_free(LDKRouteHint this_ptr);
@@ -2384,8 +2391,8 @@ public class bindings {
        public static native long RoutingFees_new(int base_msat_arg, int proportional_millionths_arg);
        // LDKRoutingFees RoutingFees_read(LDKu8slice ser);
        public static native long RoutingFees_read(byte[] ser);
-       // LDKCVec_u8Z RoutingFees_write(const LDKRoutingFees *obj);
-       public static native byte[] RoutingFees_write(long obj);
+       // LDKCVec_u8Z RoutingFees_write(const LDKRoutingFees *this_ptr);
+       public static native byte[] RoutingFees_write(long this_ptr);
        // void NodeAnnouncementInfo_free(LDKNodeAnnouncementInfo this_ptr);
        public static native void NodeAnnouncementInfo_free(long this_ptr);
        // LDKNodeFeatures NodeAnnouncementInfo_get_features(const LDKNodeAnnouncementInfo *this_ptr);
@@ -2412,8 +2419,8 @@ public class bindings {
        public static native void NodeAnnouncementInfo_set_announcement_message(long this_ptr, long val);
        // MUST_USE_RES LDKNodeAnnouncementInfo NodeAnnouncementInfo_new(LDKNodeFeatures features_arg, uint32_t last_update_arg, LDKThreeBytes rgb_arg, LDKThirtyTwoBytes alias_arg, LDKCVec_NetAddressZ addresses_arg, LDKNodeAnnouncement announcement_message_arg);
        public static native long NodeAnnouncementInfo_new(long features_arg, int last_update_arg, byte[] rgb_arg, byte[] alias_arg, long[] addresses_arg, long announcement_message_arg);
-       // LDKCVec_u8Z NodeAnnouncementInfo_write(const LDKNodeAnnouncementInfo *obj);
-       public static native byte[] NodeAnnouncementInfo_write(long obj);
+       // LDKCVec_u8Z NodeAnnouncementInfo_write(const LDKNodeAnnouncementInfo *this_ptr);
+       public static native byte[] NodeAnnouncementInfo_write(long this_ptr);
        // LDKNodeAnnouncementInfo NodeAnnouncementInfo_read(LDKu8slice ser);
        public static native long NodeAnnouncementInfo_read(byte[] ser);
        // void NodeInfo_free(LDKNodeInfo this_ptr);
@@ -2430,12 +2437,12 @@ public class bindings {
        public static native void NodeInfo_set_announcement_info(long this_ptr, long val);
        // MUST_USE_RES LDKNodeInfo NodeInfo_new(LDKCVec_u64Z channels_arg, LDKRoutingFees lowest_inbound_channel_fees_arg, LDKNodeAnnouncementInfo announcement_info_arg);
        public static native long NodeInfo_new(long[] channels_arg, long lowest_inbound_channel_fees_arg, long announcement_info_arg);
-       // LDKCVec_u8Z NodeInfo_write(const LDKNodeInfo *obj);
-       public static native byte[] NodeInfo_write(long obj);
+       // LDKCVec_u8Z NodeInfo_write(const LDKNodeInfo *this_ptr);
+       public static native byte[] NodeInfo_write(long this_ptr);
        // LDKNodeInfo NodeInfo_read(LDKu8slice ser);
        public static native long NodeInfo_read(byte[] ser);
-       // LDKCVec_u8Z NetworkGraph_write(const LDKNetworkGraph *obj);
-       public static native byte[] NetworkGraph_write(long obj);
+       // LDKCVec_u8Z NetworkGraph_write(const LDKNetworkGraph *this_ptr);
+       public static native byte[] NetworkGraph_write(long this_ptr);
        // LDKNetworkGraph NetworkGraph_read(LDKu8slice ser);
        public static native long NetworkGraph_read(byte[] ser);
        // MUST_USE_RES LDKNetworkGraph NetworkGraph_new(void);
index 609e3f85d6191b76d2829e15a7d09b4ed21d4a48..d3ac3c073d8b48d100ed9a7aa277bd4a2def6f3f 100644 (file)
@@ -32,6 +32,7 @@ public class ChannelKeys extends CommonBase {
                Result_SignatureNoneZ sign_closing_transaction(byte[] closing_tx);
                Result_SignatureNoneZ sign_channel_announcement(UnsignedChannelAnnouncement msg);
                void on_accept(ChannelPublicKeys channel_points, short counterparty_selected_contest_delay, short holder_selected_contest_delay);
+               byte[] write();
        }
        private static class LDKChannelKeysHolder { ChannelKeys held; }
        public static ChannelKeys new_impl(ChannelKeysInterface arg, ChannelPublicKeys pubkeys) {
@@ -108,6 +109,10 @@ public class ChannelKeys extends CommonBase {
                                ChannelPublicKeys channel_points_hu_conv = new ChannelPublicKeys(null, channel_points);
                                arg.on_accept(channel_points_hu_conv, counterparty_selected_contest_delay, holder_selected_contest_delay);
                        }
+                       @Override public byte[] write() {
+                               byte[] ret = arg.write();
+                               return ret;
+                       }
                }, pubkeys);
                return impl_holder.held;
        }
@@ -183,6 +188,11 @@ public class ChannelKeys extends CommonBase {
                this.ptrs_to.add(channel_points);
        }
 
+       public byte[] write() {
+               byte[] ret = bindings.ChannelKeys_write(this.ptr);
+               return ret;
+       }
+
        public ChannelPublicKeys get_pubkeys() {
                long ret = bindings.ChannelKeys_get_pubkeys(this.ptr);
                ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
index a2c6859f6835442d9806704128ddb9043d5b63a5..a0a290b0d03bb84c2670a6a298139da7be10fd81 100644 (file)
@@ -147,4 +147,9 @@ public class ChannelManager extends CommonBase {
                return ret_hu_conv;
        }
 
+       public byte[] write() {
+               byte[] ret = bindings.ChannelManager_write(this.ptr);
+               return ret;
+       }
+
 }
index 5281d6d0f22e28ef43ecdb1dddfcd82206044113..666ed72f0de3523bfdcbfd519cc23b07791a6cf0 100644 (file)
@@ -14,6 +14,11 @@ public class ChannelMonitor extends CommonBase {
                if (ptr != 0) { bindings.ChannelMonitor_free(ptr); }
        }
 
+       public byte[] write() {
+               byte[] ret = bindings.ChannelMonitor_write(this.ptr);
+               return ret;
+       }
+
        public Result_NoneMonitorUpdateErrorZ update_monitor(ChannelMonitorUpdate updates, BroadcasterInterface broadcaster, Logger logger) {
                long ret = bindings.ChannelMonitor_update_monitor(this.ptr, updates == null ? 0 : updates.ptr & ~1, broadcaster == null ? 0 : broadcaster.ptr, logger == null ? 0 : logger.ptr);
                Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
index 59c53a73e4c5edd32497abde44740e029aeb372f..960c5f20eda2e950089ea7d49b9dd6276d76debd 100644 (file)
@@ -30,9 +30,8 @@ public class ChannelMonitorUpdate extends CommonBase {
                bindings.ChannelMonitorUpdate_set_update_id(this.ptr, val);
        }
 
-       public byte[] write(ChannelMonitorUpdate obj) {
-               byte[] ret = bindings.ChannelMonitorUpdate_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.ChannelMonitorUpdate_write(this.ptr);
                return ret;
        }
 
index 1869145a8834b129b68a1228e99e0b589d2aba4e..17dbf2866b737de0faf0805f32166a41a17b022f 100644 (file)
@@ -48,9 +48,8 @@ public class ChannelReestablish extends CommonBase {
                bindings.ChannelReestablish_set_next_remote_commitment_number(this.ptr, val);
        }
 
-       public byte[] write(ChannelReestablish obj) {
-               byte[] ret = bindings.ChannelReestablish_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.ChannelReestablish_write(this.ptr);
                return ret;
        }
 
index 73788d483eba68a0dc03e86d524397c18af0589a..df76af013e1292926daba424a1de98f423c6138d 100644 (file)
@@ -45,9 +45,8 @@ public class ErrorMessage extends CommonBase {
                return ret_hu_conv;
        }
 
-       public byte[] write(ErrorMessage obj) {
-               byte[] ret = bindings.ErrorMessage_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.ErrorMessage_write(this.ptr);
                return ret;
        }
 
index abc141b3458684e7230560adde93b7dcf9ef3cb2..6e0390175513281317af30f5df3859187a2313eb 100644 (file)
@@ -60,9 +60,8 @@ public class GossipTimestampFilter extends CommonBase {
                return ret_hu_conv;
        }
 
-       public byte[] write(GossipTimestampFilter obj) {
-               byte[] ret = bindings.GossipTimestampFilter_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.GossipTimestampFilter_write(this.ptr);
                return ret;
        }
 
index 713d4a401f995780b445971de60a530176e92378..a864aa0603d2ac798f39fb1e2e7686fe647cee65 100644 (file)
@@ -84,9 +84,8 @@ public class HolderCommitmentTransaction extends CommonBase {
                return ret_hu_conv;
        }
 
-       public byte[] write(HolderCommitmentTransaction obj) {
-               byte[] ret = bindings.HolderCommitmentTransaction_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.HolderCommitmentTransaction_write(this.ptr);
                return ret;
        }
 
index 0644fb59b715caf1aeefbdbf7206e68fa20d9b9f..53210e2990f3190626ee0299eb66de099989d963 100644 (file)
@@ -104,9 +104,8 @@ public class InMemoryChannelKeys extends CommonBase {
                return ret_hu_conv;
        }
 
-       public byte[] write(InMemoryChannelKeys obj) {
-               byte[] ret = bindings.InMemoryChannelKeys_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.InMemoryChannelKeys_write(this.ptr);
                return ret;
        }
 
index 12236335695c3b8b28b94470fae1631ca5e88b0d..0efe948456443f75d38fcf6d156e71aaa0ccd6b4 100644 (file)
@@ -21,9 +21,8 @@ public class Init extends CommonBase {
                return ret_hu_conv;
        }
 
-       public byte[] write(Init obj) {
-               byte[] ret = bindings.Init_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.Init_write(this.ptr);
                return ret;
        }
 
index cb8f31f9f4b1ab9ce7e909138a6c7163dc87ce12..f39cb94e800dbfbb92ff221efeae66bd5f83b22f 100644 (file)
@@ -14,9 +14,8 @@ public class NetworkGraph extends CommonBase {
                if (ptr != 0) { bindings.NetworkGraph_free(ptr); }
        }
 
-       public byte[] write(NetworkGraph obj) {
-               byte[] ret = bindings.NetworkGraph_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.NetworkGraph_write(this.ptr);
                return ret;
        }
 
index b180a5091a018f7dc18978bde59d3df8ad1b8b57..a79799502d9f95ac51bbe95a5cb24914d6d15186 100644 (file)
@@ -64,10 +64,17 @@ public class NodeAnnouncementInfo extends CommonBase {
                this.ptrs_to.add(val);
        }
 
-       // Skipped NodeAnnouncementInfo_new
-       public byte[] write(NodeAnnouncementInfo obj) {
-               byte[] ret = bindings.NodeAnnouncementInfo_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public static NodeAnnouncementInfo constructor_new(NodeFeatures features_arg, int last_update_arg, byte[] rgb_arg, byte[] alias_arg, NetAddress[] addresses_arg, NodeAnnouncement announcement_message_arg) {
+               long ret = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, last_update_arg, rgb_arg, alias_arg, Arrays.stream(addresses_arg).mapToLong(arr_conv_12 -> arr_conv_12.ptr).toArray(), announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
+               NodeAnnouncementInfo ret_hu_conv = new NodeAnnouncementInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(features_arg);
+               /* TODO 2 NetAddress  */;
+               ret_hu_conv.ptrs_to.add(announcement_message_arg);
+               return ret_hu_conv;
+       }
+
+       public byte[] write() {
+               byte[] ret = bindings.NodeAnnouncementInfo_write(this.ptr);
                return ret;
        }
 
index 1916d9ec1e7e3464f38e77b44505c18bf5c33f8d..5f4aed27a135182645ef1d4bc5bfd540ad8537e5 100644 (file)
@@ -37,9 +37,8 @@ public class NodeInfo extends CommonBase {
 
        // Skipped NodeInfo_set_announcement_info
        // Skipped NodeInfo_new
-       public byte[] write(NodeInfo obj) {
-               byte[] ret = bindings.NodeInfo_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.NodeInfo_write(this.ptr);
                return ret;
        }
 
index 7159f0f4b8a9ee2d85433aaea03c991e8a114c9b..25e970f76e9a463d7c1674560fb6ea199b739039 100644 (file)
@@ -45,9 +45,8 @@ public class Ping extends CommonBase {
                return ret_hu_conv;
        }
 
-       public byte[] write(Ping obj) {
-               byte[] ret = bindings.Ping_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.Ping_write(this.ptr);
                return ret;
        }
 
index 54b83e7a2e4e5e0ecd653ca87f6ffcd1d3b50f8f..d44e6bc4a0cf3e85bce25c718dcbbeb28ce06dc2 100644 (file)
@@ -36,9 +36,8 @@ public class Pong extends CommonBase {
                return ret_hu_conv;
        }
 
-       public byte[] write(Pong obj) {
-               byte[] ret = bindings.Pong_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.Pong_write(this.ptr);
                return ret;
        }
 
index f12c69aab830c946ad20e9e438c26efb76af8175..ee29caf9401a1abe5b41eaa340939bea7bb7c1f3 100644 (file)
@@ -60,9 +60,8 @@ public class QueryChannelRange extends CommonBase {
                return ret_hu_conv;
        }
 
-       public byte[] write(QueryChannelRange obj) {
-               byte[] ret = bindings.QueryChannelRange_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.QueryChannelRange_write(this.ptr);
                return ret;
        }
 
index 3fb876512fa4134508021ce3d80351f9d9920473..e65af98faecc2f6513f8a9cac64d56b20ae56f28 100644 (file)
@@ -46,9 +46,8 @@ public class QueryShortChannelIds extends CommonBase {
                return ret_hu_conv;
        }
 
-       public byte[] write(QueryShortChannelIds obj) {
-               byte[] ret = bindings.QueryShortChannelIds_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.QueryShortChannelIds_write(this.ptr);
                return ret;
        }
 
index ac5bb1b1a3409f374ee0ba817867fcb42ca8cf6a..90fc25559bced532f52dcc5702341c83229ce866 100644 (file)
@@ -73,9 +73,8 @@ public class ReplyChannelRange extends CommonBase {
                return ret_hu_conv;
        }
 
-       public byte[] write(ReplyChannelRange obj) {
-               byte[] ret = bindings.ReplyChannelRange_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.ReplyChannelRange_write(this.ptr);
                return ret;
        }
 
index 6e3163c3a77fa9134ec37135bec2653dfaef3dfa..2be00711b794f469a960db9ad3cf06ff8cd2ddf5 100644 (file)
@@ -51,9 +51,8 @@ public class ReplyShortChannelIdsEnd extends CommonBase {
                return ret_hu_conv;
        }
 
-       public byte[] write(ReplyShortChannelIdsEnd obj) {
-               byte[] ret = bindings.ReplyShortChannelIdsEnd_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.ReplyShortChannelIdsEnd_write(this.ptr);
                return ret;
        }
 
index 7e2387cdd244383296d3df1d7e3890f024632e00..6bbf4fb6c28539fa477f9e824dabaa83f867c713 100644 (file)
@@ -33,9 +33,8 @@ public class Route extends CommonBase {
                return ret_hu_conv;
        }
 
-       public byte[] write(Route obj) {
-               byte[] ret = bindings.Route_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.Route_write(this.ptr);
                return ret;
        }
 
index 8ea88fcad6f0eba975f56a2ed2633f3898db256d..0671b5456c61ff5b9807ce2ccc405267b5142011 100644 (file)
@@ -51,9 +51,8 @@ public class RoutingFees extends CommonBase {
                return ret_hu_conv;
        }
 
-       public byte[] write(RoutingFees obj) {
-               byte[] ret = bindings.RoutingFees_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.RoutingFees_write(this.ptr);
                return ret;
        }
 
index 67c3d2e969f95f1eb0c5ac852d1a561af75d0ae3..96cc90d8e7e5fbd9d053ed6d7438650b5106749c 100644 (file)
@@ -82,9 +82,8 @@ public class UnsignedChannelAnnouncement extends CommonBase {
                bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val);
        }
 
-       public byte[] write(UnsignedChannelAnnouncement obj) {
-               byte[] ret = bindings.UnsignedChannelAnnouncement_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.UnsignedChannelAnnouncement_write(this.ptr);
                return ret;
        }
 
index d9ca14447338eb2832baa589a4477c9c9c43a3ba..936895d0755aba05f0f0eacbbbf0fb9c2adb889d 100644 (file)
@@ -93,9 +93,8 @@ public class UnsignedChannelUpdate extends CommonBase {
                bindings.UnsignedChannelUpdate_set_fee_proportional_millionths(this.ptr, val);
        }
 
-       public byte[] write(UnsignedChannelUpdate obj) {
-               byte[] ret = bindings.UnsignedChannelUpdate_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.UnsignedChannelUpdate_write(this.ptr);
                return ret;
        }
 
index 8a38275f8633a291ac64d8f063bc6dc5f0d1f932..65559db153b11b26095a92e69506db3cc3c35804 100644 (file)
@@ -69,9 +69,8 @@ public class UnsignedNodeAnnouncement extends CommonBase {
                /* TODO 2 NetAddress  */;
        }
 
-       public byte[] write(UnsignedNodeAnnouncement obj) {
-               byte[] ret = bindings.UnsignedNodeAnnouncement_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.UnsignedNodeAnnouncement_write(this.ptr);
                return ret;
        }
 
index dd8ab081ac59e1401384661d8903c2a19068c93d..4acad6c20a460acaf3a626ac7a0f06d3e2422f69 100644 (file)
@@ -1851,6 +1851,7 @@ typedef struct LDKChannelKeys_JCalls {
        jmethodID sign_closing_transaction_meth;
        jmethodID sign_channel_announcement_meth;
        jmethodID on_accept_meth;
+       jmethodID write_meth;
 } LDKChannelKeys_JCalls;
 LDKPublicKey get_per_commitment_point_jcall(const void* this_arg, uint64_t idx) {
        LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
@@ -2070,6 +2071,19 @@ void on_accept_jcall(void* this_arg, const LDKChannelPublicKeys *channel_points,
        CHECK(obj != NULL);
        return (*_env)->CallVoidMethod(_env, obj, j_calls->on_accept_meth, channel_points_ref, counterparty_selected_contest_delay, holder_selected_contest_delay);
 }
+LDKCVec_u8Z write_jcall(const void* this_arg) {
+       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
+       JNIEnv *_env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&_env, JNI_VERSION_1_8) == JNI_OK);
+       jobject obj = (*_env)->NewLocalRef(_env, j_calls->o);
+       CHECK(obj != NULL);
+       jbyteArray arg = (*_env)->CallObjectMethod(_env, obj, j_calls->write_meth);
+       LDKCVec_u8Z arg_ref;
+       arg_ref.datalen = (*_env)->GetArrayLength (_env, arg);
+       arg_ref.data = MALLOC(arg_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*_env)->GetByteArrayRegion(_env, arg, 0, arg_ref.datalen, arg_ref.data);
+       return arg_ref;
+}
 static void LDKChannelKeys_JCalls_free(void* this_arg) {
        LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
        if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
@@ -2134,6 +2148,7 @@ static inline LDKChannelKeys LDKChannelKeys_init (JNIEnv * env, jclass _a, jobje
                .sign_channel_announcement = sign_channel_announcement_jcall,
                .on_accept = on_accept_jcall,
                .clone = LDKChannelKeys_JCalls_clone,
+               .write = write_jcall,
                .free = LDKChannelKeys_JCalls_free,
                .pubkeys = pubkeys_conv,
                .set_pubkeys = NULL,
@@ -2290,6 +2305,15 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1on_1accept(JNIEnv
        (this_arg_conv->on_accept)(this_arg_conv->this_arg, &channel_points_conv, counterparty_selected_contest_delay, holder_selected_contest_delay);
 }
 
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1write(JNIEnv * _env, jclass _b, jlong this_arg) {
+       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
+       LDKCVec_u8Z arg_var = (this_arg_conv->write)(this_arg_conv->this_arg);
+       jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
+       (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
+       CVec_u8Z_free(arg_var);
+       return arg_arr;
+}
+
 LDKChannelPublicKeys LDKChannelKeys_set_get_pubkeys(LDKChannelKeys* this_arg) {
        if (this_arg->set_pubkeys != NULL)
                this_arg->set_pubkeys(this_arg);
@@ -6400,11 +6424,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1upd
        ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val);
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKChannelMonitorUpdate obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelMonitorUpdate_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKChannelMonitorUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = ChannelMonitorUpdate_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -6514,6 +6538,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free(JNIEnv *
        ChannelMonitor_free(this_ptr_conv);
 }
 
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKChannelMonitor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = ChannelMonitor_write(&this_ptr_conv);
+       jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
+       (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
+       CVec_u8Z_free(arg_var);
+       return arg_arr;
+}
+
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1update_1monitor(JNIEnv * _env, jclass _b, jlong this_arg, jlong updates, jlong broadcaster, jlong logger) {
        LDKChannelMonitor this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -7023,11 +7058,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1as_1Chan
        return (long)ret;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKInMemoryChannelKeys obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = InMemoryChannelKeys_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKInMemoryChannelKeys this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = InMemoryChannelKeys_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -7588,6 +7623,17 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChannelMe
        return (long)ret;
 }
 
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKChannelManager this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = ChannelManager_write(&this_ptr_conv);
+       jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
+       (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
+       CVec_u8Z_free(arg_var);
+       return arg_arr;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
        LDKChannelManagerReadArgs this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11512,11 +11558,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1read(
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKChannelReestablish obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelReestablish_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKChannelReestablish this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = ChannelReestablish_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -11668,11 +11714,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1read(JNIEnv *
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Init_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKInit obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Init_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Init_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKInit this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = Init_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -11902,11 +11948,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1read(JNIEnv *
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Ping_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKPing obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Ping_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Ping_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKPing this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = Ping_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -11928,11 +11974,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1read(JNIEnv * _env, jcl
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Pong_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKPong obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Pong_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Pong_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKPong this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = Pong_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -11954,11 +12000,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1read(JNIEnv * _env, jcl
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKUnsignedChannelAnnouncement obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UnsignedChannelAnnouncement_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKUnsignedChannelAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = UnsignedChannelAnnouncement_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -12006,11 +12052,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1read(JNI
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKUnsignedChannelUpdate obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UnsignedChannelUpdate_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKUnsignedChannelUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = UnsignedChannelUpdate_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -12058,11 +12104,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1read(JNIEnv *
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKErrorMessage obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ErrorMessage_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKErrorMessage this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = ErrorMessage_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -12084,11 +12130,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1read(JNIEnv * _
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKUnsignedNodeAnnouncement obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UnsignedNodeAnnouncement_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKUnsignedNodeAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = UnsignedNodeAnnouncement_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -12151,11 +12197,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1read(JN
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKQueryShortChannelIds obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = QueryShortChannelIds_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKQueryShortChannelIds this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = QueryShortChannelIds_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -12177,11 +12223,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1read
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKReplyShortChannelIdsEnd obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ReplyShortChannelIdsEnd_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKReplyShortChannelIdsEnd this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = ReplyShortChannelIdsEnd_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -12203,11 +12249,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1read(JNIEn
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKQueryChannelRange obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = QueryChannelRange_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKQueryChannelRange this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = QueryChannelRange_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -12229,11 +12275,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1read(JNIEn
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKReplyChannelRange obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ReplyChannelRange_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKReplyChannelRange this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = ReplyChannelRange_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -12255,11 +12301,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1read(J
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKGossipTimestampFilter obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = GossipTimestampFilter_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKGossipTimestampFilter this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = GossipTimestampFilter_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -13354,11 +13400,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1
        return (long)ret_conv;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKHolderCommitmentTransaction obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = HolderCommitmentTransaction_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKHolderCommitmentTransaction this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = HolderCommitmentTransaction_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -13651,11 +13697,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1new(JNIEnv * _env, jcl
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Route_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKRoute obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Route_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Route_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKRoute this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = Route_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -14324,11 +14370,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1read(JNIEnv * _e
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RoutingFees_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKRoutingFees obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = RoutingFees_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RoutingFees_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKRoutingFees this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = RoutingFees_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -14507,11 +14553,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1new(JNI
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKNodeAnnouncementInfo obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = NodeAnnouncementInfo_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKNodeAnnouncementInfo this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = NodeAnnouncementInfo_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -14642,11 +14688,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1new(JNIEnv * _env,
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKNodeInfo obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = NodeInfo_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKNodeInfo this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = NodeInfo_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
@@ -14668,11 +14714,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1read(JNIEnv * _env,
        return ret_ref;
 }
 
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1write(JNIEnv * _env, jclass _b, jlong obj) {
-       LDKNetworkGraph obj_conv;
-       obj_conv.inner = (void*)(obj & (~1));
-       obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = NetworkGraph_write(&obj_conv);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1write(JNIEnv * _env, jclass _b, jlong this_ptr) {
+       LDKNetworkGraph this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = NetworkGraph_write(&this_ptr_conv);
        jbyteArray arg_arr = (*_env)->NewByteArray(_env, arg_var.datalen);
        (*_env)->SetByteArrayRegion(_env, arg_arr, 0, arg_var.datalen, arg_var.data);
        CVec_u8Z_free(arg_var);
index 07711151cabe4d749a05b919dc67615decd15551..19debd2433f273a6d2774b7dda9b502b6fc28031 100644 (file)
@@ -847,6 +847,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1channel_1a
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1on_1accept
   (JNIEnv *, jclass, jlong, jlong, jshort, jshort);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelKeys_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1write
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelKeys_get_pubkeys
@@ -3247,6 +3255,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1write
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelMonitor_update_monitor
@@ -3959,6 +3975,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1disconn
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChannelMessageHandler
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelManager_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1write
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManagerReadArgs_free