[Java] Update LDK batteries to latest upstream API
[ldk-java] / typescript_strings.py
index 102d2256798cc7d3d80ccc46459c7ff7867b682e..670eb2ae73124346a41e919247f43d601e12a63f 100644 (file)
@@ -326,6 +326,10 @@ export class UInt5 {
                return this.val;
        }
 }
+
+export class UnqualifiedError {
+       public constructor(val: number) {}
+}
 """
 
         self.txout_defn = """export class TxOut extends CommonBase {
@@ -592,7 +596,7 @@ jstring __attribute__((export_name("TS_get_ldk_version"))) get_ldk_version() {
 }"""
 
         self.hu_struct_file_prefix = """
-import { CommonBase, UInt5 } from './CommonBase.mjs';
+import { CommonBase, UInt5, UnqualifiedError } from './CommonBase.mjs';
 import * as bindings from '../bindings.mjs'
 
 """
@@ -722,6 +726,9 @@ import * as bindings from '../bindings.mjs'
         with open(self.outdir + "/imports.mts.part", 'a') as imports:
             imports.write(f"import {{ {', '.join(struct_names)} }} from '../{folder}/{struct_names[0]}.mjs';\n")
 
+    def fully_qualified_hu_ty_path(self, ty):
+        return ty.java_hu_ty
+
     def native_c_unitary_enum_map(self, struct_name, variants, enum_doc_comment):
         out_c = "static inline LDK" + struct_name + " LDK" + struct_name + "_from_js(int32_t ord) {\n"
         out_c = out_c + "\tswitch (ord) {\n"