]> git.bitcoin.ninja Git - ldk-java/commitdiff
Map the new `LDKTweakedPublicKey` as a 32-byte array
authorMatt Corallo <git@bluematt.me>
Sun, 12 May 2024 14:47:13 +0000 (14:47 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 13 May 2024 18:34:51 +0000 (18:34 +0000)
genbindings.py

index b92d17efbf6c559917bf64b546f3fb143b45d0c6..9ae48c4e234dae675047412f5508fd4ccd39e5d5 100755 (executable)
@@ -165,6 +165,11 @@ def java_c_types(fn_arg, ret_arr_len):
         assert var_is_arr_regex.match(fn_arg[8:])
         rust_obj = "LDKPublicKey"
         arr_access = "compressed_form"
+    elif fn_arg.startswith("LDKTweakedPublicKey"):
+        fn_arg = "uint8_t (*" + fn_arg[21:] + ")[32]"
+        assert var_is_arr_regex.match(fn_arg[8:])
+        rust_obj = "LDKTweakedPublicKey"
+        arr_access = "x_coordinate"
     elif fn_arg.startswith("LDKSecretKey"):
         fn_arg = "uint8_t (*" + fn_arg[13:] + ")[32]"
         assert var_is_arr_regex.match(fn_arg[8:])