Fix ObjectArray (array-of-arrays) creation
[ldk-java] / src / main / java / org / ldk / impl / bindings.java
index f9c07cfb060809ae086b5a2d5d920b2083d35075..d0f08890a7e7fa5b310032179290176b6e014ded 100644 (file)
@@ -13,8 +13,10 @@ public class bindings {
        static {
                System.loadLibrary("lightningjni");
                init(java.lang.Enum.class, VecOrSliceDef.class);
+               init_class_cache();
        }
        static native void init(java.lang.Class c, java.lang.Class slicedef);
+       static native void init_class_cache();
 
        public static native boolean deref_bool(long ptr);
        public static native long deref_long(long ptr);
@@ -24,6 +26,7 @@ public class bindings {
        public static native long bytes_to_u8_vec(byte[] bytes);
        public static native long new_txpointer_copy_data(byte[] txdata);
        public static native void txpointer_free(long ptr);
+       public static native byte[] txpointer_get_buffer(long ptr);
        public static native long vec_slice_len(long vec);
        public static native long new_empty_slice_vec();
 
@@ -345,7 +348,7 @@ public class bindings {
                 long sign_channel_announcement(long msg);
                 void on_accept(long channel_points, short counterparty_selected_contest_delay, short holder_selected_contest_delay);
        }
-       public static native long LDKChannelKeys_new(LDKChannelKeys impl);
+       public static native long LDKChannelKeys_new(LDKChannelKeys impl, long pubkeys);
        public static native LDKChannelKeys LDKChannelKeys_get_obj_from_jcalls(long val);
        // LDKPublicKey ChannelKeys_get_per_commitment_point LDKChannelKeys* this_arg, uint64_t idx
        public static native byte[] ChannelKeys_get_per_commitment_point(long this_arg, long idx);
@@ -369,6 +372,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);
+       // 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);
        public static native long LDKCVecTempl_MonitorEvent_new(long[] elems);
        public interface LDKWatch {
@@ -968,6 +973,8 @@ public class bindings {
        public static native void MonitorUpdateError_free(long this_ptr);
        // void MonitorEvent_free(LDKMonitorEvent this_ptr);
        public static native void MonitorEvent_free(long this_ptr);
+       // LDKMonitorEvent MonitorEvent_clone(const LDKMonitorEvent *orig);
+       public static native long MonitorEvent_clone(long orig);
        // void HTLCUpdate_free(LDKHTLCUpdate this_ptr);
        public static native void HTLCUpdate_free(long this_ptr);
        // LDKHTLCUpdate HTLCUpdate_clone(const LDKHTLCUpdate *orig);