]> git.bitcoin.ninja Git - ldk-java/commitdiff
Update auto-generated bindings
authorMatt Corallo <git@bluematt.me>
Wed, 31 Mar 2021 19:39:27 +0000 (15:39 -0400)
committerMatt Corallo <git@bluematt.me>
Wed, 31 Mar 2021 19:54:09 +0000 (15:54 -0400)
liblightningjni_debug.so
liblightningjni_release.so
src/main/java/org/ldk/impl/bindings.java
src/main/java/org/ldk/structs/ChannelManager.java
src/main/jni/bindings.c
src/main/jni/org_ldk_impl_bindings.h
ts/bindings.c
ts/bindings.ts
ts/structs/ChannelManager.ts

index 3875f1171e888ce78dc5c4f26e84efc4905ed62e..15cc64dba99660572305d0435bc98fecf3e4db52 100755 (executable)
Binary files a/liblightningjni_debug.so and b/liblightningjni_debug.so differ
index b90244bb8f05f28cee02eda9baf229b31136847e..be4d3c928028d804535576fa9f747c7047f2d47a 100755 (executable)
Binary files a/liblightningjni_release.so and b/liblightningjni_release.so differ
index 47752cfb8c392e3b95cc2448721288412847af15..5a4dc21e7f2580d8fef147b95df73f398714757b 100644 (file)
@@ -2163,6 +2163,8 @@ public class bindings {
        public static native void ChannelManager_block_connected(long this_arg, byte[] header, long[] txdata, int height);
        // void ChannelManager_block_disconnected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80]);
        public static native void ChannelManager_block_disconnected(long this_arg, byte[] header);
+       // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
+       public static native boolean ChannelManager_await_persistable_update_timeout(long this_arg, long max_wait);
        // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native void ChannelManager_await_persistable_update(long this_arg);
        // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
index c5afb1964e181236eeaf01bd593594c63ff5f053..d0de49a291672f50455df9016f68909808a12c49 100644 (file)
@@ -394,6 +394,18 @@ public class ChannelManager extends CommonBase {
                bindings.ChannelManager_block_disconnected(this.ptr, header);
        }
 
+       /**
+        * Blocks until ChannelManager needs to be persisted or a timeout is reached. It returns a bool
+        * indicating whether persistence is necessary. Only one listener on
+        * `await_persistable_update` or `await_persistable_update_timeout` is guaranteed to be woken
+        * up.
+        * Note that the feature `allow_wallclock_use` must be enabled to use this function.
+        */
+       public boolean await_persistable_update_timeout(long max_wait) {
+               boolean ret = bindings.ChannelManager_await_persistable_update_timeout(this.ptr, max_wait);
+               return ret;
+       }
+
        /**
         * Blocks until ChannelManager needs to be persisted. Only one listener on
         * `await_persistable_update` or `await_persistable_update_timeout` is guaranteed to be woken
index 156170495d3dfd9f9ffb356ce059f9cae5411b86..221801aaa5e2ba622175f3c022d25a51e5ca8cc8 100644 (file)
@@ -12722,6 +12722,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1disconn
        ChannelManager_block_disconnected(&this_arg_conv, header_ref);
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelManager_1await_1persistable_1update_1timeout(JNIEnv *env, jclass clz, int64_t this_arg, int64_t max_wait) {
+       LDKChannelManager this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       jboolean ret_val = ChannelManager_await_persistable_update_timeout(&this_arg_conv, max_wait);
+       return ret_val;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1await_1persistable_1update(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
index 7ae607bada4dac7346ea1fffcda5e3da19743db4..b97895f7dcfaae4cf51fe7382515080d43d87762 100644 (file)
@@ -8287,6 +8287,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1connect
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1disconnected
   (JNIEnv *, jclass, jlong, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelManager_await_persistable_update_timeout
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelManager_1await_1persistable_1update_1timeout
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_await_persistable_update
index 0655425c8f11948c8cf187a94f296f39feb115fc..5b6b077430876006d1ff0fc7ece6dd898d27316d 100644 (file)
@@ -11492,6 +11492,14 @@ void  __attribute__((visibility("default"))) TS_ChannelManager_block_disconnecte
        ChannelManager_block_disconnected(&this_arg_conv, header_ref);
 }
 
+jboolean  __attribute__((visibility("default"))) TS_ChannelManager_await_persistable_update_timeout(uint32_t this_arg, int64_t max_wait) {
+       LDKChannelManager this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       jboolean ret_val = ChannelManager_await_persistable_update_timeout(&this_arg_conv, max_wait);
+       return ret_val;
+}
+
 void  __attribute__((visibility("default"))) TS_ChannelManager_await_persistable_update(uint32_t this_arg) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
index 78842cbafb806723c61803d724a4345b512516c4..3a8bfbe90632e3ad68be620b0462efab08df1827 100644 (file)
@@ -6634,6 +6634,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelManager_block_disconnected(this_arg, encodeArray(header));
                // debug statements here
        }
+       // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
+       export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
+               return nativeResponseValue;
+       }
        // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
        export function ChannelManager_await_persistable_update(this_arg: number): void {
                if(!isWasmInitialized) {
index 72337ed604cdd530e377c95eee8f5d3b675b19ff..003e029fc0be6def4fa966c684f1a7979638b8bb 100644 (file)
@@ -153,6 +153,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.ChannelManager_block_disconnected(this.ptr, header);
        }
 
+       public boolean await_persistable_update_timeout(number max_wait) {
+               boolean ret = bindings.ChannelManager_await_persistable_update_timeout(this.ptr, max_wait);
+               return ret;
+       }
+
        public void await_persistable_update() {
                bindings.ChannelManager_await_persistable_update(this.ptr);
        }