+ if (decodeString(wasm.TS_get_lib_version_string()) !== version.get_ldk_java_bindings_version())
+ throw new Error(\"Compiled LDK library and LDK class failes do not match\");
+ // Fetching the LDK versions from C also checks that the header and binaries match
+ if (wasm.TS_get_ldk_c_bindings_version() == 0)
+ throw new Error(\"LDK version did not match the header we built against\");
+ if (wasm.TS_get_ldk_version() == 0)
+ throw new Error(\"LDK C bindings version did not match the header we built against\");
+ const c_bindings_version: string = decodeString(wasm.TS_get_ldk_c_bindings_version());
+ const ldk_version: string = decodeString(wasm.TS_get_ldk_version());
+ console.log(\"Loaded LDK-Java Bindings with LDK \" + ldk_version + \" and LDK-C-Bindings \" + c_bindings_version);